Revision control
Copy as Markdown
<?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
android:id="@+id/add_on_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:layout_marginEnd="20dp"
android:addStatesFromChildren="true"
android:background="@drawable/library_item_background_color"
android:orientation="horizontal">
<androidx.cardview.widget.CardView
android:id="@+id/icon_container"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentStart="true"
android:layout_marginTop="16dp"
app:cardElevation="0dp"
app:cardCornerRadius="20dp">
<ImageView
android:id="@+id/add_on_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:importantForAccessibility="no"
android:scaleType="fitCenter"
android:src="@drawable/ic_icon_addons"
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: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">
<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:textColor="@color/library_panel_title_text_color"
android:textSize="@dimen/addon_item_title_size"
android:textStyle="bold"
tools:text="uBlock Origin" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/allowed_in_private_browsing_label"
android:layout_width="24dp"
android:layout_height="24dp"
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="@drawable/main_button_private"
android:padding="4dp"
tools:src="@drawable/ic_icon_tray_private_browsing_on_v2"
android:visibility="gone" />
</LinearLayout>
<TextView
android:id="@+id/add_on_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/library_panel_description_color"
android:textSize="@dimen/addon_item_body_size"
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:importantForAccessibility="no"
android:layout_gravity="center_vertical"
android:isIndicator="true"
android:numStars="5" />
<TextView
android:id="@+id/rating_accessibility"
android:layout_width="0dp"
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:textColor="@color/library_panel_description_color"
android:textSize="@dimen/addon_item_users_size"
android:layout_gravity="center_vertical"
tools:text="Users: 591,642" />
</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:contentDescription="@string/mozac_feature_addons_install_addon_content_description"
app:srcCompat="@drawable/ic_icon_add"
android:tint="@color/library_panel_icon_color" />
</RelativeLayout>