Revert "For #26606 - Add backplating to Top Sites
This commit is contained in:
parent
9524ab4845
commit
82fb016098
|
@ -2,76 +2,65 @@
|
|||
<!-- 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"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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/top_site_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/top_sites_item_margin_bottom"
|
||||
android:orientation="vertical"
|
||||
android:focusable="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/top_site_card"
|
||||
style="@style/TopSite.Card">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/top_site_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/favicon_image"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/topSiteFavicon"
|
||||
tools:src="@drawable/ic_pocket"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="bottom"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/favicon_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_site_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/top_sites_text_margin_top"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/fx_mobile_text_color_primary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlCompat,SmallSp"
|
||||
tools:text="Mozilla"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_site_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:singleLine="true"
|
||||
android:text="@string/top_sites_sponsored_label"
|
||||
android:textColor="@color/fx_mobile_text_color_secondary"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
android:scrollbars="none"
|
||||
tools:ignore="RtlCompat,SmallSp"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:id="@+id/favicon_card"
|
||||
style="@style/TopSite.FaviconCard"
|
||||
android:importantForAccessibility="noHideDescendants"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/favicon_image"
|
||||
style="@style/topSiteFavicon" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</FrameLayout>
|
||||
<TextView
|
||||
android:id="@+id/top_site_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="84dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/top_sites_text_margin_top"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/fx_mobile_text_color_primary"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/favicon_card"
|
||||
tools:ignore="RtlCompat,SmallSp"
|
||||
tools:text="Mozilla"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_site_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="84dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:singleLine="true"
|
||||
android:text="@string/top_sites_sponsored_label"
|
||||
android:textColor="@color/fx_mobile_text_color_secondary"
|
||||
android:textSize="10sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/top_site_title"
|
||||
tools:ignore="RtlCompat,SmallSp"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -167,16 +167,14 @@
|
|||
<dimen name="account_settings_device_name_min_height">48dp</dimen>
|
||||
|
||||
<!-- Top sites -->
|
||||
<dimen name="top_sites_item_margin_top">4dp</dimen>
|
||||
<dimen name="top_sites_item_margin_bottom">12dp</dimen>
|
||||
<dimen name="top_sites_text_margin_top">2dp</dimen>
|
||||
<dimen name="top_sites_text_margin_top">6dp</dimen>
|
||||
<dimen name="top_sites_favicon_size">36dp</dimen>
|
||||
<dimen name="top_sites_favicon_elevation">0dp</dimen>
|
||||
<dimen name="top_sites_favicon_corner_size">4dp</dimen>
|
||||
|
||||
<dimen name="top_sites_card_height">84dp</dimen>
|
||||
<dimen name="top_sites_card_width">72dp</dimen>
|
||||
<dimen name="top_sites_card_padding">8dp</dimen>
|
||||
<dimen name="top_sites_card_size">60dp</dimen>
|
||||
<dimen name="top_sites_card_padding">12dp</dimen>
|
||||
<dimen name="top_sites_card_elevation">6dp</dimen>
|
||||
<dimen name="top_sites_card_radius">8dp</dimen>
|
||||
|
||||
|
|
|
@ -674,14 +674,11 @@
|
|||
<item name="behavior_halfExpandedRatio">0.001</item>
|
||||
</style>
|
||||
|
||||
<style name="TopSite.Card" parent="Mozac.Widgets.Favicon">
|
||||
<item name="android:layout_width">@dimen/top_sites_card_width</item>
|
||||
<item name="android:layout_height">@dimen/top_sites_card_height</item>
|
||||
<item name="android:layout_marginTop">@dimen/top_sites_item_margin_top</item>
|
||||
<item name="android:layout_marginBottom">@dimen/top_sites_item_margin_bottom</item>
|
||||
<item name="android:layout_gravity">center_horizontal</item>
|
||||
<item name="android:importantForAccessibility">noHideDescendants</item>
|
||||
<item name="contentPadding">@dimen/top_sites_card_padding</item>
|
||||
<style name="TopSite.FaviconCard" parent="Mozac.Widgets.Favicon">
|
||||
<item name="android:layout_width">@dimen/top_sites_card_size</item>
|
||||
<item name="android:layout_height">@dimen/top_sites_card_size</item>
|
||||
<item name="android:padding">@dimen/top_sites_card_padding</item>
|
||||
<item name="cardBackgroundColor">?mozac_widget_favicon_background_color</item>
|
||||
<item name="cardCornerRadius">@dimen/top_sites_card_radius</item>
|
||||
<item name="cardElevation">@dimen/top_sites_card_elevation</item>
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue