How do I change the background color of the ActionBar of an ActionBarActivity using XML?

后端 未结 20 3146
我寻月下人不归
我寻月下人不归 2020-11-22 01:09

Details:

I\'m extending ActionBarActivity.
Eclipse and SDK fully patched as of 2011-11-06.



        
20条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 01:45

    If you are using androidx AppCompact. Use below code.

    androidx.appcompat.app.ActionBar actionBar = getSupportActionBar();
    actionBar.setBackgroundDrawable(new ColorDrawable("Color"));
    

提交回复
热议问题