Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void createCustomActionBarTitle()
- {
- this.getSupportActionBar().setDisplayShowCustomEnabled(true);
- this.getSupportActionBar().setDisplayShowTitleEnabled(false);
- LayoutInflater inflater = LayoutInflater.from(this);
- View v = inflater.inflate(R.layout.custom_action_bar,null);
- customBarTitle = (TextView) v.findViewById(R.id.title);
- this.getSupportActionBar().setCustomView(v);
- Toolbar parent = (Toolbar) v.getParent();
- parent.setContentInsetsAbsolute(0,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement