0
private void setListNavigation(ActionBar bar) {
String[] actions = new String[] {
"Bookmark",
"Subscribe",
"Share"
};
ArrayAdapter <String> adapter = new ArrayAdapter <String> (getBaseContext(), android.R.layout.simple_spinner_dropdown_item, actions);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
bar.setDisplayShowTitleEnabled(false); // hide application title from action bar
bar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#dedfde")));
}
當我嘗試添加微調到我的操作欄,它不顯示。我只是單獨得到小箭頭圖標。微調列表不顯示我的操作欄?
下面是我onCreate()
方法
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_prime_mobile_home);
ActionBar bar = getActionBar();
setListNavigation(bar);
}