In my activity that extends the FragmentActivity class, I can't disable the title using this.requestWindowFeature(Window.FEATURE_NO_TITLE);
. It gives an ANR.
How can I disable a FragmentActivity's title?
This is the partial code of the activity's start:
public class NewOrderActivity extends FragmentActivity implements TabListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
...
}
}
EDIT: ANSWER:
Okay, I found out that in an activity that has an ActionBar declared in it, the title is a part of the Action Bar not the windows itself.
so in my code I did this to get rid of the window's ( or better to say, ActionBar's ) title:
...
...
final ActionBar actionBar = getActionBar();
actionBar.setDisplayOptions(Window.FEATURE_NO_TITLE);
...
...