I am trying to hide title barin full screen. When I try to use Activity, the title bar disappears. But when I use AppCompatActivity, it still remains. Any idea why this is happening? Should I change something else, like a manifest? Here is the code I used to hide the title bar and go into full screen mode:
public class MoreInfoNotification extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.more_info_notification);
}
Thanks. Hurrah!
source
share