android studio - Blank Activity Fit To Screen -


in android studio 2.1, want create main activity 2. how can ? please see attachment. can fix exact screen size of device android game ?

simple way: in activity need extends activity instead of appcompatactivity:

public class youractivity extends appcompatactivity 

==>

public class youractivity extends activity 

update: put in oncreate() method, go full screen mode

getwindow().getdecorview().setsystemuivisibility( view.system_ui_flag_layout_stable | view.system_ui_flag_layout_hide_navigation | view.system_ui_flag_layout_fullscreen | view.system_ui_flag_hide_navigation | view.system_ui_flag_fullscreen | view.system_ui_flag_immersive_sticky); 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo