diff options
author | Andrew Dolgov <[email protected]> | 2020-10-02 15:16:55 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-10-02 15:16:55 +0300 |
commit | 39d707061fc481ca8163444f224339fe6b2314b1 (patch) | |
tree | d0da14ab032ef09260cd289842320970a2e6d4ac /org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml | |
parent | 1a1051caee2eeb2ea265c3db7f033731252c9c49 (diff) |
use coordinator layout / appbarlayout to deal with collapsing toolbars and article header
Diffstat (limited to 'org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml')
-rw-r--r-- | org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml b/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml index e9cfdc35..157ad794 100644 --- a/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml +++ b/org.fox.ttrss/src/main/res/layout/activity_detail_phone.xml @@ -5,12 +5,28 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - <FrameLayout - android:id="@+id/article_fragment" + <androidx.coordinatorlayout.widget.CoordinatorLayout + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="?articleBackground"> - </FrameLayout> + android:layout_height="match_parent"> + + <com.google.android.material.appbar.AppBarLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include layout="@layout/toolbar" android:id="@+id/toolbar" /> + + </com.google.android.material.appbar.AppBarLayout> + + <FrameLayout + android:id="@+id/article_fragment" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?articleBackground"> + </FrameLayout> + + </androidx.coordinatorlayout.widget.CoordinatorLayout> <FrameLayout android:id="@+id/headlines_fragment" @@ -20,5 +36,4 @@ android:background="?headlinesBackground"> </FrameLayout> - <include layout="@layout/toolbar" android:id="@+id/toolbar" /> </FrameLayout>
\ No newline at end of file |