summaryrefslogtreecommitdiffstats
path: root/mobile/android/android-components/components/feature/addons/src/main/res/layout/mozac_feature_addons_item.xml
blob: 9ed77d46fef8adc3b1abb9e320155ab8f4e9c9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->

<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="0dp"
    android:paddingEnd="0dp">

    <LinearLayout
        android:id="@+id/add_on_content_wrapper"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_toStartOf="@+id/add_button"
        android:orientation="horizontal">

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/add_on_icon"
            style="@style/Mozac.Widgets.Favicon"
            android:layout_marginTop="16dp"
            android:layout_marginStart="16dp"
            android:importantForAccessibility="no"
            app:srcCompat="@android:color/transparent"
            tools:ignore="RequiredSize" />

        <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:orientation="vertical"
            android:paddingStart="8dp"
            android:paddingTop="8dp"
            android:paddingEnd="4dp"
            android:paddingBottom="8dp">

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/add_on_name_container_margin_bottom"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/add_on_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textSize="16sp"
                    tools:text="uBlock Origin" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/allowed_in_private_browsing_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="@dimen/allowed_in_private_browsing_label_margins"
                    android:layout_marginEnd="@dimen/allowed_in_private_browsing_label_margins"
                    android:layout_weight="0"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:visibility="gone" />

            </LinearLayout>

            <TextView
                android:id="@+id/add_on_description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                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">

                <RatingBar
                    android:id="@+id/rating"
                    style="@style/Widget.AppCompat.RatingBar.Small"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:importantForAccessibility="no"
                    android:isIndicator="true"
                    android:numStars="5" />

                <TextView
                    android:id="@+id/rating_accessibility"
                    android:layout_width="0dp"
                    android:layout_height="0dp" />

                <TextView
                    android:id="@+id/review_count"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="6dp"
                    android:textSize="12sp"
                    tools:text="Reviews: 591,642" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/add_on_status_error"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:orientation="vertical"
                android:visibility="gone">

                <TextView
                    android:id="@+id/add_on_status_error_message"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="@color/mozac_feature_addons_error_text_color"
                    android:textSize="14sp"
                    tools:text="@string/mozac_feature_addons_status_blocklisted" />

                <TextView
                    android:id="@+id/add_on_status_error_learn_more_link"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/mozac_feature_addons_status_learn_more"
                    android:textColor="?android:attr/textColorLink"
                    android:textSize="14sp" />
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/add_button"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:scaleType="center"
        android:layout_marginStart="0dp"
        android:layout_marginEnd="6dp"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"
        android:background="?attr/selectableItemBackgroundBorderless"
        app:srcCompat="@drawable/mozac_ic_plus_24"
        app:tint="?android:attr/textColorPrimary" />
</RelativeLayout>