0

i dont know how to change the title bar of the slidingmenu,like the icon,the backgroundcolor or image, is there a way to use my own layout file? I have used sherlock,
i try this:

    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);

but it not work as i want

1 Answers1

0

simply setTitle(int ResID) in Activity's onCreate method.

Lin
  • 26
  • 4
  • setTitle method is just for the text,but i want to change the icon and the backgroud image of the title bar – qinyifeng Apr 26 '13 at 02:40
  • try to combine slidingMenu with ActionBarSherlock and then view this page http://actionbarsherlock.com/theming.html – Lin Apr 26 '13 at 02:58