-
Notifications
You must be signed in to change notification settings - Fork 0
/
activity_sticky2.xml
73 lines (62 loc) · 2.92 KB
/
activity_sticky2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- set StatusBar's height to layout_height on code -->
<Space
android:id="@+id/statusBarMargin"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_scrollFlags="scroll" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="3"
android:text="@string/header_item"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
app:layout_scrollFlags="scroll" />
</com.google.android.material.appbar.AppBarLayout>
<!-- set TabLayout's height to paddingTop on code -->
<!-- set NavigationBar's height to paddingBottom or paddingRight on code -->
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="3"
android:text="@string/content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</androidx.core.widget.NestedScrollView>
<!-- set StatusBar's height to layout_marginTop on code -->
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/translucent"
app:layout_anchor="@id/appBarLayout"
app:layout_anchorGravity="bottom">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tab" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tab" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tab" />
</com.google.android.material.tabs.TabLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>