Skip to content

Commit 06bfd65

Browse files
ADFA-4910: pin the Get More hub Continue button to the bottom
The wizard Continue button lived inside the ScrollView, so it scrolled away with the content cards. Move the cards into a weighted ScrollView and pin the Continue button below it (outside the scroll), matching the other wizard steps.
1 parent 47d438b commit 06bfd65

1 file changed

Lines changed: 91 additions & 80 deletions

File tree

Lines changed: 91 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,117 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- ADFA-4848: Get More hub — the content catalog entry. Header + a 2-column grid of
3-
content-type cards, filled programmatically by GetMoreHubFragment. -->
4-
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
content-type cards, filled programmatically by GetMoreHubFragment.
4+
ADFA-4910: the wizard "Continue" button is pinned to the bottom (outside the ScrollView), like
5+
the other wizard steps, so it never scrolls away with the cards. -->
6+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
57
android:layout_width="match_parent"
68
android:layout_height="match_parent"
7-
android:fillViewport="true">
9+
android:orientation="vertical">
810

9-
<LinearLayout
11+
<ScrollView
1012
android:layout_width="match_parent"
11-
android:layout_height="wrap_content"
12-
android:orientation="vertical"
13-
android:paddingLeft="20dp"
14-
android:paddingRight="20dp"
15-
android:paddingTop="24dp"
16-
android:paddingBottom="24dp">
13+
android:layout_height="0dp"
14+
android:layout_weight="1"
15+
android:fillViewport="true">
1716

18-
<TextView
19-
android:id="@+id/k2go_gm_title"
20-
android:layout_width="wrap_content"
21-
android:layout_height="wrap_content"
22-
android:text="@string/k2go_gm_hub_title"
23-
android:textAppearance="?attr/textAppearanceHeadlineMedium"
24-
android:textColor="@color/k2go_ink" />
25-
26-
<!-- ADFA-4853: wizard-only header — step spine + storage projection, mirroring Step 2. -->
2717
<LinearLayout
28-
android:id="@+id/k2go_gm_wizard_header"
2918
android:layout_width="match_parent"
3019
android:layout_height="wrap_content"
3120
android:orientation="vertical"
32-
android:visibility="gone">
33-
34-
<LinearLayout
35-
android:id="@+id/k2go_gm_spine"
36-
android:layout_width="wrap_content"
37-
android:layout_height="wrap_content"
38-
android:layout_marginTop="10dp"
39-
android:orientation="horizontal" />
21+
android:paddingLeft="20dp"
22+
android:paddingRight="20dp"
23+
android:paddingTop="24dp"
24+
android:paddingBottom="16dp">
4025

4126
<TextView
27+
android:id="@+id/k2go_gm_title"
4228
android:layout_width="wrap_content"
4329
android:layout_height="wrap_content"
44-
android:layout_marginTop="16dp"
45-
android:text="@string/k2go_storage"
46-
android:textAppearance="?attr/textAppearanceBodySmall"
47-
android:textColor="@color/k2go_muted" />
30+
android:text="@string/k2go_gm_hub_title"
31+
android:textAppearance="?attr/textAppearanceHeadlineMedium"
32+
android:textColor="@color/k2go_ink" />
4833

34+
<!-- ADFA-4853: wizard-only header — step spine + storage projection, mirroring Step 2. -->
4935
<LinearLayout
50-
android:id="@+id/k2go_gm_bar"
36+
android:id="@+id/k2go_gm_wizard_header"
5137
android:layout_width="match_parent"
52-
android:layout_height="18dp"
53-
android:layout_marginTop="6dp"
54-
android:orientation="horizontal">
55-
<View android:id="@+id/k2go_gm_bar_used" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_muted" />
56-
<View android:id="@+id/k2go_gm_bar_system" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_teal" />
57-
<View android:id="@+id/k2go_gm_bar_picks" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_leaf" />
58-
<View android:id="@+id/k2go_gm_bar_free" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_hairline" />
38+
android:layout_height="wrap_content"
39+
android:orientation="vertical"
40+
android:visibility="gone">
41+
42+
<LinearLayout
43+
android:id="@+id/k2go_gm_spine"
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:layout_marginTop="10dp"
47+
android:orientation="horizontal" />
48+
49+
<TextView
50+
android:layout_width="wrap_content"
51+
android:layout_height="wrap_content"
52+
android:layout_marginTop="16dp"
53+
android:text="@string/k2go_storage"
54+
android:textAppearance="?attr/textAppearanceBodySmall"
55+
android:textColor="@color/k2go_muted" />
56+
57+
<LinearLayout
58+
android:id="@+id/k2go_gm_bar"
59+
android:layout_width="match_parent"
60+
android:layout_height="18dp"
61+
android:layout_marginTop="6dp"
62+
android:orientation="horizontal">
63+
<View android:id="@+id/k2go_gm_bar_used" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_muted" />
64+
<View android:id="@+id/k2go_gm_bar_system" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_teal" />
65+
<View android:id="@+id/k2go_gm_bar_picks" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_leaf" />
66+
<View android:id="@+id/k2go_gm_bar_free" android:layout_width="0dp" android:layout_height="match_parent" android:background="@color/k2go_hairline" />
67+
</LinearLayout>
68+
69+
<TextView
70+
android:id="@+id/k2go_gm_legend"
71+
android:layout_width="wrap_content"
72+
android:layout_height="wrap_content"
73+
android:layout_marginTop="6dp"
74+
android:textAppearance="?attr/textAppearanceBodySmall"
75+
android:textColor="@color/k2go_muted" />
5976
</LinearLayout>
6077

6178
<TextView
62-
android:id="@+id/k2go_gm_legend"
63-
android:layout_width="wrap_content"
79+
android:layout_width="match_parent"
6480
android:layout_height="wrap_content"
65-
android:layout_marginTop="6dp"
66-
android:textAppearance="?attr/textAppearanceBodySmall"
81+
android:layout_marginTop="4dp"
82+
android:text="@string/k2go_gm_hub_sub"
83+
android:textAppearance="?attr/textAppearanceBodyLarge"
6784
android:textColor="@color/k2go_muted" />
68-
</LinearLayout>
69-
70-
<TextView
71-
android:layout_width="match_parent"
72-
android:layout_height="wrap_content"
73-
android:layout_marginTop="4dp"
74-
android:text="@string/k2go_gm_hub_sub"
75-
android:textAppearance="?attr/textAppearanceBodyLarge"
76-
android:textColor="@color/k2go_muted" />
7785

78-
<TextView
79-
android:layout_width="match_parent"
80-
android:layout_height="wrap_content"
81-
android:layout_marginTop="20dp"
82-
android:text="@string/k2go_gm_hub_prompt"
83-
android:textAppearance="?attr/textAppearanceBodyLarge"
84-
android:textColor="@color/k2go_ink" />
86+
<TextView
87+
android:layout_width="match_parent"
88+
android:layout_height="wrap_content"
89+
android:layout_marginTop="20dp"
90+
android:text="@string/k2go_gm_hub_prompt"
91+
android:textAppearance="?attr/textAppearanceBodyLarge"
92+
android:textColor="@color/k2go_ink" />
8593

86-
<LinearLayout
87-
android:id="@+id/k2go_gm_cards"
88-
android:layout_width="match_parent"
89-
android:layout_height="wrap_content"
90-
android:layout_marginTop="8dp"
91-
android:orientation="vertical" />
94+
<LinearLayout
95+
android:id="@+id/k2go_gm_cards"
96+
android:layout_width="match_parent"
97+
android:layout_height="wrap_content"
98+
android:layout_marginTop="8dp"
99+
android:orientation="vertical" />
100+
</LinearLayout>
101+
</ScrollView>
92102

93-
<!-- ADFA-4853: wizard-only; proceeds to the install step. Styled like other primary
94-
buttons so it reads as part of the flow. -->
95-
<Button
96-
android:id="@+id/k2go_gm_continue"
97-
android:layout_width="match_parent"
98-
android:layout_height="52dp"
99-
android:layout_marginTop="20dp"
100-
android:text="@string/k2go_wizard_continue"
101-
android:textColor="@android:color/white"
102-
android:textAllCaps="false"
103-
android:backgroundTint="@color/k2go_teal"
104-
android:visibility="gone" />
105-
</LinearLayout>
106-
</ScrollView>
103+
<!-- ADFA-4853/4910: wizard-only; pinned to the bottom so it stays visible over the scroll. -->
104+
<Button
105+
android:id="@+id/k2go_gm_continue"
106+
android:layout_width="match_parent"
107+
android:layout_height="52dp"
108+
android:layout_marginLeft="20dp"
109+
android:layout_marginRight="20dp"
110+
android:layout_marginTop="12dp"
111+
android:layout_marginBottom="16dp"
112+
android:text="@string/k2go_wizard_continue"
113+
android:textColor="@android:color/white"
114+
android:textAllCaps="false"
115+
android:backgroundTint="@color/k2go_teal"
116+
android:visibility="gone" />
117+
</LinearLayout>

0 commit comments

Comments
 (0)