2013-08-29 66 views
1

我的移動應用程序必須具有所有空間(活動)的背景圖像。 ActionBar是透明的,我想通過ActionBar看到背景圖像。 如何做到這一點?如何在ActionBar下設置背景

回答

0

我認爲你可以做這樣的事情讓你的動作條透明:

getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); 
ActionBar actionBar = getActionBar(); 
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#330000ff"))); 
actionBar.setStackedBackgroundDrawable(new ColorDrawable(Color.parseColor("#550000ff")));