Remove Android App Title Bar
I was able to do this for Android 2.1 devices and above using an App Compatibility library theme applied to the app element in the manifest:
<application
...
android:theme="@style/AppTheme" />
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
...
<item name="windowNoTitle">true</item>
<item name="android:windowNoTitle">true</item>
</style>
Note: You will need to include the com.android.support:appcompat-v7
library in your build.gradle file
for Title Bar
requestWindowFeature(Window.FEATURE_NO_TITLE);
for fullscreen
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Place this after
super.onCreate(savedInstanceState);
but before
setContentView(R.layout.xml);
This worked for me.try this
In the Design Tab, click on the AppTheme Button
Choose the option "AppCompat.Light.NoActionBar"
Click OK.
Simple way is to put this in your onCreate()
:
// Java
getSupportActionBar().hide();
// Kotlin
supportActionBar?.hide()