mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-04 15:28:21 +03:00
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.
88 lines
4.1 KiB
XML
88 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="?android:selectableItemBackground">
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
android:id="@+id/notificationActionIcon"
|
|
android:layout_width="48dp"
|
|
android:layout_height="0dp"
|
|
android:layout_marginStart="12dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="8dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintDimensionRatio="1"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:tint="?android:textColorPrimary"
|
|
tools:ignore="ContentDescription"
|
|
tools:src="@drawable/ic_previous" />
|
|
|
|
<org.schabi.newpipe.views.NewPipeTextView
|
|
android:id="@+id/notificationActionTitle"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
android:textSize="14sp"
|
|
app:layout_constraintBottom_toTopOf="@+id/notificationActionSummary"
|
|
app:layout_constraintEnd_toEndOf="@id/notificationActionClickableArea"
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
app:layout_constraintStart_toEndOf="@+id/notificationActionIcon"
|
|
app:layout_constraintTop_toTopOf="@+id/notificationActionIcon"
|
|
app:layout_constraintVertical_chainStyle="packed"
|
|
tools:text="Second action button | Lorem ipsum dolor sit amet, consectetur adipisci elit" />
|
|
|
|
<org.schabi.newpipe.views.NewPipeTextView
|
|
android:id="@+id/notificationActionSummary"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
app:layout_constraintBottom_toBottomOf="@+id/notificationActionIcon"
|
|
app:layout_constraintEnd_toEndOf="@+id/notificationActionClickableArea"
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
app:layout_constraintStart_toStartOf="@+id/notificationActionTitle"
|
|
app:layout_constraintTop_toBottomOf="@+id/notificationActionTitle"
|
|
tools:text="Play • Pause • Buffering | Lorem ipsum dolor sit amet, consectetur adipisci elit" />
|
|
|
|
<View
|
|
android:id="@+id/notificationActionClickableArea"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:background="?android:selectableItemBackground"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@id/notificationActionCheckBoxClickableArea"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/notificationActionCheckBox"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:clickable="false"
|
|
android:focusable="false"
|
|
app:layout_constraintBottom_toBottomOf="@+id/notificationActionCheckBoxClickableArea"
|
|
app:layout_constraintEnd_toEndOf="@+id/notificationActionCheckBoxClickableArea"
|
|
app:layout_constraintStart_toStartOf="@+id/notificationActionCheckBoxClickableArea"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<View
|
|
android:id="@+id/notificationActionCheckBoxClickableArea"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintDimensionRatio="H,1:1"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|