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.
This commit is contained in:
parent
660408e35b
commit
a6bebe7b54
69 changed files with 362 additions and 295 deletions
|
|
@ -70,7 +70,7 @@
|
|||
tools:ignore="ContentDescription"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/touch_append_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_duration_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
tools:text="12:38"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_position_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
android:paddingStart="12dp"
|
||||
tools:ignore="RtlSymmetry">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_video_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -291,7 +291,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_sub_channel_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -307,7 +307,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="Channel" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_uploader_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -348,7 +348,7 @@
|
|||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_view_count_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
android:contentDescription="@string/detail_likes_img_view_description"
|
||||
app:srcCompat="@drawable/ic_thumb_up" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_thumbs_up_count_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||
|
|
@ -394,7 +394,7 @@
|
|||
app:srcCompat="@drawable/ic_thumb_down"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_thumbs_down_count_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||
|
|
@ -408,7 +408,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="10K" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_thumbs_disabled_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||
|
|
@ -436,7 +436,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/detail_control_padding">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_playlist_append"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -452,7 +452,7 @@
|
|||
android:textSize="@dimen/detail_control_text_size"
|
||||
app:drawableTopCompat="@drawable/ic_playlist_add" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_background"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -468,7 +468,7 @@
|
|||
android:textSize="@dimen/detail_control_text_size"
|
||||
app:drawableTopCompat="@drawable/ic_headset" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_popup"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -484,7 +484,7 @@
|
|||
android:textSize="@dimen/detail_control_text_size"
|
||||
app:drawableTopCompat="@drawable/ic_picture_in_picture" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_download"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -515,7 +515,7 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_share"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -531,7 +531,7 @@
|
|||
android:textSize="@dimen/detail_control_text_size"
|
||||
app:drawableTopCompat="@drawable/ic_share" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_open_in_browser"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -547,7 +547,7 @@
|
|||
android:textSize="@dimen/detail_control_text_size"
|
||||
app:drawableTopCompat="@drawable/ic_language" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_controls_play_with_kodi"
|
||||
android:layout_width="@dimen/detail_control_width"
|
||||
android:layout_height="@dimen/detail_control_height"
|
||||
|
|
@ -573,7 +573,7 @@
|
|||
android:layout_marginRight="8dp"
|
||||
android:background="?attr/separator_color" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/detail_meta_info_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -654,7 +654,7 @@
|
|||
android:orientation="vertical"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/overlay_title_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -668,7 +668,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="The Video Title LONG very LONVideo Title LONG very LONG" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/overlay_channel_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
android:orientation="vertical"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="The Video Title LONG very LONG" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/channelTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
tools:text="The Video Artist LONG very LONG very Long" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/qualityTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
tools:ignore="HardcodedText,RtlHardcoded"
|
||||
tools:text="720p" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/playbackSpeed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/resizeTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
|
|
@ -257,7 +257,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/captionTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
android:orientation="vertical"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/currentDisplaySeek"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -409,7 +409,7 @@
|
|||
android:paddingLeft="@dimen/player_main_controls_padding"
|
||||
android:paddingRight="@dimen/player_main_controls_padding">
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/playbackCurrentTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -433,7 +433,7 @@
|
|||
tools:progress="25"
|
||||
tools:secondaryProgress="50" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/playbackEndTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -443,7 +443,7 @@
|
|||
tools:ignore="HardcodedText"
|
||||
tools:text="1:23:49" />
|
||||
|
||||
<TextView
|
||||
<org.schabi.newpipe.views.NewPipeTextView
|
||||
android:id="@+id/playbackLiveSync"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue