Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void formatTitle(){
- TextView tv = new TextView(getApplicationContext());
- ActionBar.LayoutParams lp = new ActionBar.LayoutParams(
- ActionBar.LayoutParams.MATCH_PARENT, // Width of TextView
- ActionBar.LayoutParams.WRAP_CONTENT); // Height of TextView
- tv.setLayoutParams(lp);
- tv.setText(actionBar.getTitle()); // ActionBar title text
- tv.setTextColor(Color.WHITE);
- tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP,18);
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
- actionBar.setCustomView(tv);
- actionBar.setDisplayShowHomeEnabled(true);
- actionBar.setDisplayHomeAsUpEnabled(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement