remove title bar android 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: hide the title bar android studio

getSupportActionBar().hide();

Example 4: 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 5: removing title bar from android app

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

Tags:

Java Example