|
16 | 16 | ~ along with Sarrafi. If not, see <https://www.gnu.org/licenses/>.
|
17 | 17 | -->
|
18 | 18 |
|
19 |
| -<LinearLayout |
| 19 | +<androidx.coordinatorlayout.widget.CoordinatorLayout |
20 | 20 | xmlns:android="http://schemas.android.com/apk/res/android"
|
| 21 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
21 | 22 | xmlns:tools="http://schemas.android.com/tools"
|
22 | 23 | android:layout_width="match_parent"
|
23 | 24 | android:layout_height="match_parent"
|
24 | 25 | android:layoutDirection="rtl"
|
25 | 26 | android:orientation="vertical"
|
26 | 27 | tools:context=".activity.DetailActivity">
|
27 | 28 |
|
28 |
| - <include layout="@layout/toolbar"/> |
| 29 | + <com.google.android.material.appbar.AppBarLayout |
| 30 | + android:id="@+id/appbar" |
| 31 | + android:layout_width="match_parent" |
| 32 | + android:layout_height="wrap_content" |
| 33 | + android:background="@color/colorPrimary" |
| 34 | + app:liftOnScroll="true" |
| 35 | + app:liftOnScrollTargetViewId="@id/detail_scrollview" |
| 36 | + android:overScrollMode="always"> |
| 37 | + |
| 38 | + <androidx.appcompat.widget.Toolbar |
| 39 | + android:id="@+id/toolbar" |
| 40 | + android:layout_width="match_parent" |
| 41 | + android:layout_height="?attr/actionBarSize"/> |
| 42 | + |
| 43 | + </com.google.android.material.appbar.AppBarLayout> |
29 | 44 |
|
30 |
| - <ScrollView |
| 45 | + <androidx.core.widget.NestedScrollView |
31 | 46 | android:id="@+id/detail_scrollview"
|
32 | 47 | android:layout_width="match_parent"
|
33 |
| - android:layout_height="match_parent"> |
| 48 | + android:layout_height="match_parent" |
| 49 | + app:layout_behavior="@string/appbar_scrolling_view_behavior" > |
34 | 50 | <include layout="@layout/content_detail" />
|
35 |
| - </ScrollView> |
| 51 | + </androidx.core.widget.NestedScrollView> |
36 | 52 |
|
37 |
| -</LinearLayout> |
| 53 | +</androidx.coordinatorlayout.widget.CoordinatorLayout> |
0 commit comments