The task is to use the device screen completely, along with the line where the clock and pop-up messages. Is it possible to do this or at least replace the area with a black stripe that can not be used for graphics?

    2 answers 2

    Add this string to your Activity's onCreate() method onCreate()

     getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN) 

      You can do this programmatically:

       public class ActivityName extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // remove title requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } } 

      Or via AndroidManifest.xml

       <activity android:name=".ActivityName" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/> 

      If you use AppCompatActivity, you can set a theme like this:

       <activity android:name=".ActivityName" android:label="@string/app_name" android:theme="@android:style/Theme.AppCompat.Light.NoActionBar"/> 

      A source