1
0
Fork 0

For #2780 - Fix home screen attributes for API 21-22 (#2844)

master
Emily Kager 2019-05-24 14:03:59 -07:00 committed by Jeff Boek
parent b75de72a19
commit beb2dec79f
6 changed files with 81 additions and 102 deletions

View File

@ -332,6 +332,7 @@ dependencies {
implementation Deps.androidx_lifecycle_viewmodel_ss
implementation Deps.androidx_core
implementation Deps.androidx_transition
implementation Deps.google_material
implementation Deps.autodispose

View File

@ -3,18 +3,29 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector android:height="24dp" android:viewportHeight="20"
android:viewportWidth="20" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="?primaryText" android:fillType="nonZero"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="?primaryText"
android:pathData="M18,6L2,6L2,17C2,17.5523 2.4477,18 3,18L17,18C17.5523,18 18,17.5523 18,17L18,6ZM16.7908,4L15.333,2.3401C15.1432,2.1239 14.8694,2 14.5817,2L5.8284,2C5.5632,2 5.3089,2.1054 5.1213,2.2929L3.4142,4L16.7908,4ZM0,17L0,5.8284C0,5.0328 0.3161,4.2697 0.8787,3.7071L3.7071,0.8787C4.2697,0.3161 5.0328,0 5.8284,0L14.5817,0C15.4448,0 16.2662,0.3718 16.8358,1.0203L19.2541,3.7739C19.7349,4.3213 20,5.025 20,5.7536L20,17C20,18.6569 18.6569,20 17,20L3,20C1.3431,20 0,18.6569 0,17Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="?primaryText" android:fillType="nonZero"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="?primaryText"
android:pathData="M14.95,8.5L5.05,8.5C4.7462,8.5 4.5,8.7239 4.5,9C4.5,9.2761 4.7462,9.5 5.05,9.5L14.95,9.5C15.2538,9.5 15.5,9.2761 15.5,9C15.5,8.7239 15.2538,8.5 14.95,8.5Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="?primaryText" android:fillType="nonZero"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="?primaryText"
android:pathData="M14.95,14.5L5.05,14.5C4.7462,14.5 4.5,14.7239 4.5,15C4.5,15.2761 4.7462,15.5 5.05,15.5L14.95,15.5C15.2538,15.5 15.5,15.2761 15.5,15C15.5,14.7239 15.2538,14.5 14.95,14.5Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="?primaryText" android:fillType="nonZero"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="?primaryText"
android:pathData="M14.95,11.5L5.05,11.5C4.7462,11.5 4.5,11.7239 4.5,12C4.5,12.2761 4.7462,12.5 5.05,12.5L14.95,12.5C15.2538,12.5 15.5,12.2761 15.5,12C15.5,11.7239 15.2538,11.5 14.95,11.5Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@ -2,8 +2,7 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/finish_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -12,18 +11,9 @@
android:backgroundTint="?accent"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:focusable="false"
android:textStyle="bold"
android:gravity="center"
android:text="@string/onboarding_finish"
android:textColor="?contrastText"
android:textSize="16sp" />
</FrameLayout>
android:gravity="center"
android:text="@string/onboarding_finish"
android:textAllCaps="false"
android:textColor="?contrastText"
android:textSize="16sp"
android:textStyle="bold" />

View File

@ -2,47 +2,43 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/onboarding_card"
style="@style/OnboardingCardDark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/header_text"
android:drawableStart="@drawable/ic_onboarding_firefox_accounts"
android:drawablePadding="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
android:drawableStart="@drawable/ic_onboarding_firefox_accounts"
android:drawablePadding="12dp"
android:text="@string/onboarding_firefox_account_header"
android:textAppearance="@style/Header16TextStyle"
android:textColor="@color/onboarding_card_primary_text_dark"/>
<FrameLayout
android:textColor="@color/onboarding_card_primary_text_dark" />
<Button
android:id="@+id/turn_on_sync_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/button_background"
android:backgroundTint="@color/onboarding_card_button_background_dark"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:focusable="false"
android:textStyle="bold"
android:gravity="center"
android:text="@string/onboarding_firefox_account_sign_in"
android:textColor="?neutral"
android:textSize="14sp" />
</FrameLayout>
<FrameLayout
android:gravity="center"
android:padding="10dp"
android:text="@string/onboarding_firefox_account_sign_in"
android:textAllCaps="false"
android:textColor="?neutral"
android:textSize="14sp"
android:textStyle="bold"
app:backgroundTint="@color/onboarding_card_button_background_dark" />
<Button
android:id="@+id/stay_signed_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -51,40 +47,28 @@
android:backgroundTint="@color/onboarding_card_button_background_dark"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:padding="10dp"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:focusable="false"
android:textStyle="bold"
android:gravity="center"
android:text="@string/onboarding_firefox_account_stay_signed_in"
android:textColor="?neutral"
android:textSize="14sp" />
</FrameLayout>
<FrameLayout
android:text="@string/onboarding_firefox_account_stay_signed_in"
android:textAllCaps="false"
android:textColor="?neutral"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
<Button
android:id="@+id/sign_out_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/button_background"
android:backgroundTint="@color/onboarding_card_button_background_dark"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:padding="10dp"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:focusable="false"
android:gravity="center"
android:text="@string/onboarding_firefox_account_sign_out"
android:textColor="?neutral"
android:textSize="12sp" />
</FrameLayout>
</LinearLayout>
android:text="@string/onboarding_firefox_account_sign_out"
android:textAllCaps="false"
android:textColor="?neutral"
android:textSize="12sp"
android:visibility="gone" />
</LinearLayout>

View File

@ -2,32 +2,23 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/save_tab_group_button"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/button_background"
android:backgroundTint="?accent"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:padding="6dp">
<TextView
android:id="@+id/save_tab_group_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:drawableTint="?foundation"
android:drawableStart="@drawable/ic_tab_collection"
android:drawablePadding="8dp"
android:focusable="false"
android:gravity="center"
android:textStyle="bold"
android:text="@string/save_to_collection"
android:textColor="?contrastText"/>
</FrameLayout>
android:letterSpacing="0"
android:text="@string/save_to_collection"
android:textAllCaps="false"
android:textColor="?contrastText"
android:textStyle="bold"
android:theme="@style/Theme.MaterialComponents.Light"
app:backgroundTint="?accent"
app:icon="@drawable/ic_tab_collection"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconTint="?attr/foundation" />

View File

@ -27,6 +27,7 @@ private object Versions {
const val androidx_testing = "1.1.0-alpha08"
const val androidx_core = "1.2.0-alpha01"
const val androidx_transition = "1.1.0-rc01"
const val google_material = "1.1.0-alpha06"
const val mozilla_android_components = "0.54.0-SNAPSHOT"
// Note that android-components also depends on application-services,
@ -150,6 +151,7 @@ object Deps {
const val androidx_recyclerview = "androidx.recyclerview:recyclerview:${Versions.androidx_recyclerview}"
const val androidx_core = "androidx.core:core:${Versions.androidx_core}"
const val androidx_transition = "androidx.transition:transition:${Versions.androidx_transition}"
const val google_material = "com.google.android.material:material:{${Versions.google_material}"
const val autodispose = "com.uber.autodispose:autodispose:${Versions.autodispose}"
const val autodispose_android = "com.uber.autodispose:autodispose-android:${Versions.autodispose}"