I am learning android dev and my question might be very simple. I am stuck at the below part and requesting your help
Description
I am using the
use FrameLayout
instead of LinearLayout
and add this to your FrameLayout
of the fragment
android:layout_marginTop="?attr/actionBarSize"
at leaset worked for me.
This might come from the default behaviour of the CoordinatorLayout. I also assume that you add your fragments in the frameLayout frameCheck. In your app bar code layout, replace
<FrameLayout
android:id="@+id/framecheck"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
with :
<FrameLayout
android:id="@+id/framecheck"
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior"
android:layout_width="match_parent"
android:layout_height="match_parent" />