2013-04-26 46 views
0

我不知道如何改变slidingmenu的标题栏,喜欢的图标,或者的backgroundColor图像的标题栏,有没有用我自己的布局文件的方法吗?我已经使用夏洛克,
我试试这个:如何改变SlidingMenu

LayoutInflater inflator = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
    View v1 = inflator.inflate(R.layout.titleview, null);((TextView)v1.findViewById(R.id.title)).setText("hello title"); 
    this.getSupportActionBar().setCustomView(v1); 

,但它不工作,我想

回答

0

简单setTitle(int ResID)在活动的onCreate方法。

+0

setTitle方法仅用于文本,但我想更改标题栏的图标和背景图像 – qinyifeng 2013-04-26 02:40:06

+0

尝试将slidingMenu与ActionBarSherlock结合,然后查看此页面http://actionbarsherlock.com/theming.html – Lin 2013-04-26 02:58:51