android remove title bar code example

Example 1: kotlin remove name from an activity

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    try
    {
        this.getSupportActionBar().hide();
    }
    catch (NullPointerException e){}

    setContentView(R.layout.activity_main);
}

Example 2: android studio removing title bar

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar" />

Example 3: how to remove title bar android studio

change
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

Example 4: remove app name from top android

<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">

Example 5: hide title bar android

requestWindowFeature(Window.FEATURE_NO_TITLE);
getSupportActionBar().hide();
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  
               			  WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);

Example 6: removing title bar from android app

res -> values -> styles.xml
<item name="windowNoTitle">true</item>

Tags:

Misc Example