NewPipe/app/src/main/res/layout/mission_item.xml
TiA4f8R a55acd38df
Use a custom TextView everywhere to be able to share with ShareUtils the selected text
This TextView class extends the AppCompatTextView class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:40:54 +02:00

87 lines
3.3 KiB
XML

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/item_bkg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:background="@color/bluegray">
<RelativeLayout
android:id="@+id/item_title_line"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="2dp">
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="6dp"
android:singleLine="true"
android:text="0%"
android:textColor="@color/white"
android:textSize="20sp" />
<ImageView
android:id="@+id/item_more"
style="?attr/buttonBarButtonStyle"
android:layout_width="49dp"
android:layout_height="49dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="1dp"
android:contentDescription="TODO"
android:scaleType="center"
app:srcCompat="@drawable/ic_more_vert"
app:tint="?attr/actionColor" />
</RelativeLayout>
<ImageView
android:id="@+id/item_icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_below="@id/item_title_line"
android:layout_centerHorizontal="true"
android:contentDescription="TODO"
android:gravity="center"
android:padding="10dp"
android:scaleType="fitXY"
app:tint="?attr/actionColor" />
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/item_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/item_icon"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:padding="6dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="XXX.xx"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/item_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/item_name"
android:padding="6dp"
android:singleLine="true"
android:text="100.00MB"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
</RelativeLayout>