Currently in my FragmentActivity
, I hide the status bar by, in the onCreate
method, doing the following:
requestWindowFeature(Wind
There are couple of ways of doing so:
First Approach:
FEATURE_CUSTOM_TITLE
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.foo_layout);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_bar);
or
youractivity.setTitle();
NOTE! you can include a simple TextView
in side your layout custom_title_bar
Make you custom_title_bar
layout as follows:
Second Approach:
Activity.setTitle
this.setTitle("My Title!");