[fenix] For https://github.com/mozilla-mobile/fenix/issues/26520 - Color homepage...
[gecko.git] / mobile / android / fenix / app / src / main / res / layout / top_site_item.xml
blobf29343ed79240ed619d25bf32cb9dda453b7edcf
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3    - License, v. 2.0. If a copy of the MPL was not distributed with this
4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <FrameLayout
6     xmlns:android="http://schemas.android.com/apk/res/android"
7     xmlns:app="http://schemas.android.com/apk/res-auto"
8     xmlns:tools="http://schemas.android.com/tools"
9     android:layout_width="match_parent"
10     android:layout_height="wrap_content"
11     android:focusable="true">
13     <com.google.android.material.card.MaterialCardView
14         android:id="@+id/top_site_card"
15         style="@style/TopSite.Card">
17         <androidx.constraintlayout.widget.ConstraintLayout
18             android:id="@+id/top_site_item"
19             android:layout_width="match_parent"
20             android:layout_height="match_parent"
21             android:orientation="vertical">
23             <com.google.android.material.imageview.ShapeableImageView
24                 android:id="@+id/favicon_image"
25                 app:layout_constraintLeft_toLeftOf="parent"
26                 app:layout_constraintRight_toRightOf="parent"
27                 app:layout_constraintTop_toTopOf="parent"
28                 style="@style/topSiteFavicon"
29                 tools:src="@drawable/ic_pocket"/>
31             <LinearLayout
32                 android:layout_width="wrap_content"
33                 android:layout_height="0dp"
34                 android:orientation="vertical"
35                 android:gravity="bottom"
36                 app:layout_constraintLeft_toLeftOf="parent"
37                 app:layout_constraintRight_toRightOf="parent"
38                 app:layout_constraintTop_toBottomOf="@id/favicon_image"
39                 app:layout_constraintBottom_toBottomOf="parent">
41                 <TextView
42                     android:id="@+id/top_site_title"
43                     android:layout_width="wrap_content"
44                     android:layout_height="wrap_content"
45                     android:layout_gravity="center_horizontal"
46                     android:layout_marginTop="@dimen/top_sites_text_margin_top"
47                     android:drawablePadding="2dp"
48                     android:gravity="center"
49                     android:textAlignment="center"
50                     android:singleLine="true"
51                     android:textColor="@color/fx_mobile_text_color_primary"
52                     android:textSize="12sp"
53                     tools:ignore="RtlCompat,SmallSp"
54                     tools:text="Mozilla"/>
56                 <TextView
57                     android:id="@+id/top_site_subtitle"
58                     android:layout_width="wrap_content"
59                     android:layout_height="wrap_content"
60                     android:layout_gravity="center_horizontal"
61                     android:gravity="center"
62                     android:textAlignment="center"
63                     android:singleLine="true"
64                     android:text="@string/top_sites_sponsored_label"
65                     android:textColor="@color/fx_mobile_text_color_secondary"
66                     android:textSize="11sp"
67                     android:visibility="gone"
68                     android:scrollbars="none"
69                     tools:ignore="RtlCompat,SmallSp"
70                     tools:visibility="visible"/>
71             </LinearLayout>
73         </androidx.constraintlayout.widget.ConstraintLayout>
75     </com.google.android.material.card.MaterialCardView>
77 </FrameLayout>