Skip to content

Commit 860c061

Browse files
committed
Update for variable font size
1 parent 49dab2e commit 860c061

2 files changed

Lines changed: 46 additions & 27 deletions

File tree

WordPress/src/main/res/layout-land/jetpack_powered_expanded_bottom_sheet.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
android:id="@+id/illustration_view"
2323
android:layout_width="wrap_content"
2424
android:layout_height="wrap_content"
25-
android:layout_marginTop="@dimen/margin_extra_medium_large"
25+
android:layout_marginTop="@dimen/margin_extra_large"
2626
android:scaleType="centerCrop"
2727
app:layout_constraintTop_toBottomOf="@id/handle"
2828
app:layout_constraintStart_toStartOf="parent"
29-
app:layout_constraintBottom_toBottomOf="@id/title"
29+
app:layout_constraintBottom_toTopOf="@id/title"
3030
app:lottie_rawRes="@raw/wp2jp"
3131
app:lottie_enableMergePathsForKitKatAndAbove="true"
3232
app:lottie_autoPlay="true"
@@ -51,7 +51,7 @@
5151
android:text="@string/wp_jetpack_powered_reader_powered_by_jetpack_caption"
5252
android:layout_width="match_parent"
5353
android:layout_height="wrap_content"
54-
android:layout_marginTop="@dimen/margin_extra_medium_large"
54+
android:layout_marginTop="@dimen/margin_extra_large"
5555
app:layout_constraintTop_toBottomOf="@id/title"
5656
app:layout_constraintStart_toStartOf="parent"
5757
app:layout_constraintEnd_toEndOf="parent"/>
@@ -60,10 +60,10 @@
6060
android:id="@+id/primary_button"
6161
android:layout_width="match_parent"
6262
android:layout_height="wrap_content"
63-
android:layout_marginTop="@dimen/margin_64dp"
63+
android:layout_marginTop="@dimen/margin_extra_large"
6464
android:backgroundTint="@color/jetpack_green_40"
6565
android:gravity="center"
66-
android:minHeight="@dimen/margin_64dp"
66+
android:minHeight="@dimen/margin_extra_extra_large"
6767
app:cornerRadius="@dimen/margin_small_medium"
6868
android:text="@string/wp_jetpack_get_new_jetpack_app"
6969
android:textAppearance="?attr/textAppearanceSubtitle2"
@@ -79,9 +79,9 @@
7979
android:layout_width="match_parent"
8080
android:layout_height="wrap_content"
8181
android:layout_gravity="center"
82-
android:layout_marginBottom="@dimen/margin_64dp"
82+
android:layout_marginBottom="@dimen/margin_extra_extra_medium_large"
8383
android:gravity="center"
84-
android:minHeight="@dimen/margin_64dp"
84+
android:minHeight="@dimen/margin_extra_extra_large"
8585
android:textAppearance="?attr/textAppearanceSubtitle2"
8686
android:textAllCaps="false"
8787
android:textColor="@color/jetpack_green"

WordPress/src/main/res/layout/jetpack_powered_expanded_bottom_sheet.xml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:paddingStart="@dimen/margin_extra_extra_medium_large"
7+
android:background="@color/jetpack_powered_bottom_sheet_background"
88
android:paddingEnd="@dimen/margin_extra_extra_medium_large"
9-
android:background="@color/jetpack_powered_bottom_sheet_background">
9+
android:paddingStart="@dimen/margin_extra_extra_medium_large">
1010

1111
<include
1212
android:id="@+id/handle"
@@ -18,19 +18,28 @@
1818
app:layout_constraintStart_toStartOf="parent"
1919
app:layout_constraintTop_toTopOf="parent" />
2020

21+
<androidx.constraintlayout.widget.Barrier
22+
android:id="@+id/topBarrier"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
app:barrierDirection="top"
26+
app:constraint_referenced_ids="illustration_view"
27+
app:layout_constraintEnd_toEndOf="parent"
28+
app:layout_constraintStart_toStartOf="parent"
29+
app:layout_constraintTop_toBottomOf="@id/handle" />
30+
2131
<com.airbnb.lottie.LottieAnimationView
2232
android:id="@+id/illustration_view"
2333
android:layout_width="wrap_content"
2434
android:layout_height="wrap_content"
25-
android:layout_marginTop="@dimen/margin_64dp"
2635
android:scaleType="centerCrop"
27-
app:layout_constraintTop_toBottomOf="@id/handle"
36+
app:layout_constraintBottom_toTopOf="@id/title"
2837
app:layout_constraintStart_toStartOf="parent"
29-
app:layout_constraintBottom_toBottomOf="@id/title"
30-
app:lottie_rawRes="@raw/wp2jp"
31-
app:lottie_enableMergePathsForKitKatAndAbove="true"
38+
app:layout_constraintTop_toBottomOf="@id/topBarrier"
3239
app:lottie_autoPlay="true"
33-
app:lottie_loop="false" />
40+
app:lottie_enableMergePathsForKitKatAndAbove="true"
41+
app:lottie_loop="false"
42+
app:lottie_rawRes="@raw/wp2jp" />
3443

3544
<TextView
3645
android:id="@+id/title"
@@ -40,38 +49,49 @@
4049
android:layout_marginTop="@dimen/margin_extra_medium_large"
4150
android:text="@string/wp_jetpack_powered_reader_powered_by_jetpack"
4251
android:textFontWeight="700"
43-
app:layout_constraintTop_toBottomOf="@id/illustration_view"
44-
app:layout_constraintStart_toStartOf="parent"
4552
app:layout_constraintEnd_toEndOf="parent"
53+
app:layout_constraintStart_toStartOf="parent"
54+
app:layout_constraintTop_toBottomOf="@id/illustration_view"
4655
tools:targetApi="p" />
4756

4857
<TextView
4958
android:id="@+id/caption"
5059
style="?attr/textAppearanceBody1"
51-
android:text="@string/wp_jetpack_powered_reader_powered_by_jetpack_caption"
5260
android:layout_width="match_parent"
5361
android:layout_height="wrap_content"
5462
android:layout_marginTop="@dimen/margin_extra_medium_large"
55-
app:layout_constraintTop_toBottomOf="@id/title"
63+
android:layout_marginBottom="@dimen/margin_theme_browser_top"
64+
android:text="@string/wp_jetpack_powered_reader_powered_by_jetpack_caption"
65+
app:layout_constraintBottom_toTopOf="@id/bottomBarrier"
66+
app:layout_constraintEnd_toEndOf="parent"
5667
app:layout_constraintStart_toStartOf="parent"
57-
app:layout_constraintEnd_toEndOf="parent"/>
68+
app:layout_constraintTop_toBottomOf="@id/title"
69+
app:layout_constraintVertical_bias="0.0" />
70+
71+
<androidx.constraintlayout.widget.Barrier
72+
android:id="@+id/bottomBarrier"
73+
android:layout_width="wrap_content"
74+
android:layout_height="wrap_content"
75+
app:barrierDirection="top"
76+
app:constraint_referenced_ids="primary_button"
77+
app:layout_constraintBottom_toTopOf="@id/primary_button"
78+
app:layout_constraintEnd_toEndOf="parent"
79+
app:layout_constraintStart_toStartOf="parent" />
5880

5981
<com.google.android.material.button.MaterialButton
6082
android:id="@+id/primary_button"
6183
android:layout_width="match_parent"
6284
android:layout_height="wrap_content"
63-
android:layout_marginTop="@dimen/margin_200dp"
6485
android:backgroundTint="@color/jetpack_green_40"
6586
android:gravity="center"
6687
android:minHeight="@dimen/margin_64dp"
67-
app:cornerRadius="@dimen/margin_small_medium"
6888
android:text="@string/wp_jetpack_get_new_jetpack_app"
6989
android:textAppearance="?attr/textAppearanceSubtitle2"
7090
android:textColor="?attr/colorOnSecondary"
71-
app:layout_constraintTop_toBottomOf="@id/caption"
91+
app:cornerRadius="@dimen/margin_small_medium"
92+
app:layout_constraintBottom_toTopOf="@id/secondary_button"
7293
app:layout_constraintEnd_toEndOf="parent"
73-
app:layout_constraintStart_toStartOf="parent"
74-
app:layout_constraintBottom_toTopOf="@id/secondary_button"/>
94+
app:layout_constraintStart_toStartOf="parent" />
7595

7696
<com.google.android.material.button.MaterialButton
7797
android:id="@+id/secondary_button"
@@ -82,10 +102,9 @@
82102
android:layout_marginBottom="@dimen/margin_64dp"
83103
android:gravity="center"
84104
android:minHeight="@dimen/margin_extra_extra_large"
85-
android:textAppearance="?attr/textAppearanceSubtitle2"
86105
android:textAllCaps="false"
106+
android:textAppearance="?attr/textAppearanceSubtitle2"
87107
android:textColor="@color/jetpack_green"
88-
app:layout_constraintTop_toBottomOf="@id/primary_button"
89108
app:layout_constraintBottom_toBottomOf="parent"
90109
app:layout_constraintEnd_toEndOf="parent"
91110
app:layout_constraintStart_toStartOf="parent"

0 commit comments

Comments
 (0)