Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ActionBar actionBar = getSupportActionBar();
- // actionBar.setHomeButtonEnabled(true);
- actionBar.setDisplayHomeAsUpEnabled(true);
- // Set Title
- // actionBar.setTitle(name);
- actionBar.setDisplayShowCustomEnabled(true);
- // actionBar.setHomeButtonEnabled(true);
- actionBar.setDisplayShowTitleEnabled(false);
- TextView title = new TextView(getApplicationContext());
- title.setText(name);
- title.setTextColor(Color.WHITE);
- title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
- title.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
- actionBar.setCustomView(title);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement