Commit daa3595a authored by MozLando's avatar MozLando
Browse files

Merge #6136



6136: For #6102 - When tinting ImageViews, use AppCompatImageView and app:tint r=pocmo a=ekager
Co-authored-by: default avatarekager <ekager@mozilla.com>
parents 854e6fe1 ec9236d4
......@@ -2,79 +2,79 @@
- 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/. -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:windowBackground"
android:orientation="vertical"
tools:ignore="Overdraw">
<ImageView
android:id="@+id/icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:importantForAccessibility="no"
android:scaleType="center"
app:srcCompat="@drawable/mozac_ic_extensions"
android:tint="?android:attr/textColorPrimary" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:importantForAccessibility="no"
android:scaleType="center"
app:tint="?android:attr/textColorPrimary"
app:srcCompat="@drawable/mozac_ic_extensions" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/icon"
android:layout_alignParentTop="true"
android:layout_marginStart="3dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="11dp"
android:layout_toEndOf="@id/icon"
android:paddingStart="5dp"
android:paddingTop="4dp"
android:paddingEnd="5dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
tools:text="Add Ublock Origin?"
tools:textColor="#000000" />
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/icon"
android:layout_alignParentTop="true"
android:layout_marginStart="3dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="11dp"
android:layout_toEndOf="@id/icon"
android:paddingStart="5dp"
android:paddingTop="4dp"
android:paddingEnd="5dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
tools:text="Add Ublock Origin?"
tools:textColor="#000000" />
<TextView
android:id="@+id/permissions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_alignStart="@id/title"
android:layout_marginTop="16dp"
android:paddingStart="5dp"
android:paddingTop="4dp"
android:paddingEnd="5dp"
android:textColor="?android:attr/textColorPrimary"
tools:text="It requires your permission to: \n\n • Access your data for all websites. \n\n • Acess browser tabs. \n\n • Access browser activity during navigation." />
android:id="@+id/permissions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_alignStart="@id/title"
android:layout_marginTop="16dp"
android:paddingStart="5dp"
android:paddingTop="4dp"
android:paddingEnd="5dp"
android:textColor="?android:attr/textColorPrimary"
tools:text="It requires your permission to: \n\n • Access your data for all websites. \n\n • Acess browser tabs. \n\n • Access browser activity during navigation." />
<Button
android:id="@+id/deny_button"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/permissions"
android:layout_marginTop="16dp"
android:layout_toStartOf="@id/allow_button"
android:text="@string/mozac_feature_addons_permissions_dialog_cancel"
android:textAllCaps="false" />
android:id="@+id/deny_button"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/permissions"
android:layout_marginTop="16dp"
android:layout_toStartOf="@id/allow_button"
android:text="@string/mozac_feature_addons_permissions_dialog_cancel"
android:textAllCaps="false" />
<Button
android:id="@+id/allow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/permissions"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/mozac_feature_addons_permissions_dialog_add"
android:textAllCaps="false" />
android:id="@+id/allow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/permissions"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/mozac_feature_addons_permissions_dialog_add"
android:textAllCaps="false" />
</RelativeLayout>
\ No newline at end of file
......@@ -4,82 +4,82 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/add_on_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/add_on_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<androidx.cardview.widget.CardView
android:id="@+id/icon_container"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentStart="true"
android:layout_marginTop="16dp"
android:elevation="0dp"
app:cardCornerRadius="30dp">
android:id="@+id/icon_container"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentStart="true"
android:layout_marginTop="16dp"
android:elevation="0dp"
app:cardCornerRadius="30dp">
<ImageView
android:id="@+id/add_on_icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:importantForAccessibility="no"
app:srcCompat="@android:color/transparent"
android:scaleType="fitCenter" />
android:id="@+id/add_on_icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:importantForAccessibility="no"
android:scaleType="fitCenter"
app:srcCompat="@android:color/transparent" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:id="@+id/details_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="8dp"
android:paddingEnd="4dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_toStartOf="@+id/add_button"
android:layout_toEndOf="@+id/icon_container"
android:orientation="vertical">
android:id="@+id/details_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_toStartOf="@+id/add_button"
android:layout_toEndOf="@+id/icon_container"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="4dp"
android:paddingBottom="8dp">
<TextView
android:id="@+id/add_on_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:ellipsize="end"
android:maxLines="1"
android:layout_marginBottom="6dp"
tools:text="uBlock Origin" />
android:id="@+id/add_on_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:ellipsize="end"
android:maxLines="1"
android:textStyle="bold"
tools:text="uBlock Origin" />
<TextView
android:id="@+id/add_on_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
tools:text="An efficient blocker: easy on memory and CPU footprint, and yet can load and enforce thousands more filters than other popular blockers out there." />
android:id="@+id/add_on_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
tools:text="An efficient blocker: easy on memory and CPU footprint, and yet can load and enforce thousands more filters than other popular blockers out there." />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:orientation="horizontal">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:orientation="horizontal">
<RatingBar
android:id="@+id/rating"
style="@style/Widget.AppCompat.RatingBar.Small"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:isIndicator="true"
android:importantForAccessibility="no"
android:numStars="5" />
android:id="@+id/rating"
style="@style/Widget.AppCompat.RatingBar.Small"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:importantForAccessibility="no"
android:isIndicator="true"
android:numStars="5" />
<TextView
android:id="@+id/rating_accessibility"
......@@ -87,26 +87,26 @@
android:layout_height="0dp" />
<TextView
android:id="@+id/users_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:textSize="12sp"
tools:text="Users: 591,642" />
android:id="@+id/users_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:textSize="12sp"
tools:text="Users: 591,642" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/add_button"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="12dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:contentDescription="@string/mozac_feature_addons_install_addon_content_description"
android:background="?attr/selectableItemBackgroundBorderless"
android:tint="?android:attr/textColorPrimary"
app:srcCompat="@drawable/mozac_ic_new" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/add_button"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/mozac_feature_addons_install_addon_content_description"
android:padding="12dp"
app:srcCompat="@drawable/mozac_ic_new"
app:tint="?android:attr/textColorPrimary" />
</RelativeLayout>
......@@ -26,12 +26,12 @@
android:paddingBottom="8dp"
android:orientation="horizontal">
<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/mozac_feature_addons_remove"
android:layout_gravity="center_vertical"
android:tint="@android:color/darker_gray"
app:tint="@android:color/darker_gray"
app:srcCompat="@drawable/mozac_ic_close"/>
<LinearLayout
......
......@@ -4,22 +4,22 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/add_on_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:importantForAccessibility="no"
android:scaleType="fitCenter"
app:srcCompat="@drawable/mozac_ic_extensions"
android:tint="?android:attr/textColorPrimary" />
app:tint="?android:attr/textColorPrimary" />
<RelativeLayout
android:layout_width="wrap_content"
......@@ -31,14 +31,14 @@
android:id="@+id/add_on_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/add_on_remove_button"
android:layout_centerVertical="true"
android:textSize="18sp"
android:layout_toStartOf="@+id/add_on_remove_button"
android:ellipsize="end"
android:maxLines="1"
android:textSize="18sp"
tools:text="uBlock Origin" />
<ImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/add_on_remove_button"
android:layout_width="48dp"
android:layout_height="48dp"
......@@ -46,7 +46,7 @@
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/mozac_feature_addons_remove"
app:srcCompat="@drawable/mozac_ic_delete"
android:tint="?android:attr/textColorPrimary" />
app:tint="?android:attr/textColorPrimary"
app:srcCompat="@drawable/mozac_ic_delete" />
</RelativeLayout>
</LinearLayout>
......@@ -11,7 +11,7 @@
android:orientation="vertical"
tools:ignore="Overdraw">
<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="32dp"
android:layout_height="32dp"
......@@ -21,7 +21,7 @@
android:importantForAccessibility="no"
android:scaleType="center"
app:srcCompat="@drawable/mozac_feature_download_ic_download"
android:tint="?android:attr/textColorPrimary" />
app:tint="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/title"
......@@ -41,7 +41,7 @@
tools:text="Download (85.7 MB)"
tools:textColor="#000000" />
<ImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/close_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -54,7 +54,7 @@
android:background="@null"
android:contentDescription="@string/mozac_feature_downloads_button_close"
app:srcCompat="@drawable/mozac_ic_close"
android:tint="?android:attr/textColorPrimary"
app:tint="?android:attr/textColorPrimary"
tools:textColor="#000000" />
<TextView
......
......@@ -7,6 +7,6 @@
<item name="android:layout_width">48dp</item>
<item name="android:layout_height">48dp</item>
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:tint">#ff000000</item>
<item name="tint">#ff000000</item>
</style>
</resources>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="Overdraw"
android:background="?android:windowBackground"
android:orientation="vertical">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:windowBackground"
android:orientation="vertical"
tools:ignore="Overdraw">
<ImageView
android:id="@+id/icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:scaleType="center"
tools:src="@android:drawable/ic_menu_camera"
android:importantForAccessibility="no"
android:layout_alignParentTop="true"
android:layout_marginTop="16dp"
android:tint="?android:attr/textColorPrimary"
tools:tint="#000000"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:importantForAccessibility="no"
android:scaleType="center"
app:tint="?android:attr/textColorPrimary"
tools:src="@android:drawable/ic_menu_camera"
tools:tint="#000000" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="11dp"
android:layout_marginStart="3dp"
tools:textColor="#000000"
android:textColor="?android:attr/textColorPrimary"
android:paddingTop="4dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_alignParentTop="true"
android:layout_marginTop="16dp"
android:layout_toEndOf="@id/icon"
android:layout_alignBaseline="@id/icon"
tools:text="Allow wikipedia.org to use your camera?"/>
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/icon"
android:layout_alignParentTop="true"
android:layout_marginStart="3dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="11dp"
android:layout_toEndOf="@id/icon"
android:paddingStart="5dp"
android:paddingTop="4dp"
android:paddingEnd="5dp"
android:textColor="?android:attr/textColorPrimary"
tools:text="Allow wikipedia.org to use your camera?"
tools:textColor="#000000" />
<CheckBox
android:id="@+id/do_not_ask_again"
android:layout_marginTop="16dp"
android:layout_below="@id/title"
android:layout_alignStart="@id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingStart="0dp"
android:paddingEnd="4dp"
android:visibility="gone"
android:textColor="?android:attr/textColorPrimary"
tools:visibility="visible"
android:text="@string/mozac_feature_sitepermissions_do_not_ask_again_on_this_site2"
android:checked="true"/>
android:id="@+id/do_not_ask_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_alignStart="@id/title"
android:layout_marginTop="16dp"
android:checked="true"
android:paddingStart="0dp"
android:paddingTop="4dp"
android:paddingEnd="4dp"
android:text="@string/mozac_feature_sitepermissions_do_not_ask_again_on_this_site2"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone"
tools:visibility="visible" />
<Button
android:id="@+id/deny_button"
android:layout_below="@id/do_not_ask_again"
android:layout_toStartOf="@id/allow_button"
android:layout_marginTop="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="false"
android:text="@string/mozac_feature_sitepermissions_not_allow"
style="?android:attr/borderlessButtonStyle"/>
android:id="@+id/deny_button"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/do_not_ask_again"
android:layout_marginTop="16dp"
android:layout_toStartOf="@id/allow_button"
android:text="@string/mozac_feature_sitepermissions_not_allow"
android:textAllCaps="false" />
<Button
android:id="@+id/allow_button"
android:layout_alignParentEnd="true"
android:layout_below="@id/do_not_ask_again"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="8dp"
android:textAllCaps="false"