-
-
Save ilyasKerbal/7711351458959b5ddb189a582a6d79b1 to your computer and use it in GitHub Desktop.
Working sample of fragment inside CoordinatorLayout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/main_content" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:background="?attr/colorPrimary" | |
app:layout_scrollFlags="scroll|enterAlways" | |
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | |
</android.support.design.widget.AppBarLayout> | |
<fragment | |
android:id="@+id/some_fragment" | |
android:name="de.no.no.fragments.SomeFragment" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:layout="@layout/some_fragment" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
/> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment