Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android fragment getting hidden under the action bar

Got a weird problem. Contents of the fragment getting hidden under the action bar. Its a pretty basic drawer layout and a fragment.

enter image description here

New to android and don't know if this is how it is. I used margin just to pull this down, as you can see below. But this doesn't sound correct to me... please throw some light where am I going wrong. Thanks in Advance.

enter image description here

like image 730
Mouli Avatar asked Jul 21 '14 09:07

Mouli


2 Answers

It is the normal and expected behaviour if you set FEATURE_ACTION_BAR_OVERLAY (android:windowActionBarOverlay) . Here the documentation

like image 152
Blackbelt Avatar answered Sep 29 '22 00:09

Blackbelt


Add an attribute app:layout_behavior="@string/appbar_scrolling_view_behavior" to your parent view of your fragment.

like image 31
Uttam Pramanik Avatar answered Sep 29 '22 00:09

Uttam Pramanik