I want my layout to start below the status bar and expand till the end of screen . Navigation bar should be hidden .
For this i have used this theme :
<style name="AppTheme.NoActionbarThemeDefaultStatusColor" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
</style
for my actiivity. And i also use below code in the oncreate method of my activity.
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
or View.SYSTEM_UI_FLAG_LOW_PROFILE)
Everything is fine i.e status bar is there , no navigation bar is there . But the layout's top part is hidden below status bar . I want layout to start after status bar . But not sure how to do this.