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.
See https://github.com/TeamNewPipe/NewPipe/issues/6577#issuecomment-876095378
java.lang.ClassCastException: android.widget.ImageButton cannot be cast to androidx.appcompat.widget.AppCompatImageButton
at org.schabi.newpipe.player.Player.onRepeatModeChanged(Player.java:2263)
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$setRepeatMode$2(ExoPlayerImpl.java:564)
at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$rgrcbaqP9Y8LgzdByBnAfUO4ydU.invokeListener(lambda)
at com.google.android.exoplayer2.BasePlayer$ListenerHolder.invoke(BasePlayer.java:279)
at com.google.android.exoplayer2.ExoPlayerImpl.invokeAll(ExoPlayerImpl.java:1498)
at com.google.android.exoplayer2.ExoPlayerImpl.lambda$notifyListeners$6(ExoPlayerImpl.java:1318)
at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$b59raXxaB-trjwE5bgpZInm1QnU.run(lambda)
at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1328)
at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1318)
at com.google.android.exoplayer2.ExoPlayerImpl.setRepeatMode(ExoPlayerImpl.java:564)
at com.google.android.exoplayer2.SimpleExoPlayer.setRepeatMode(SimpleExoPlayer.java:1636)
at org.schabi.newpipe.player.Player.setRepeatMode(Player.java:2253)
at org.schabi.newpipe.player.Player.onRepeatClicked(Player.java:2232)
at org.schabi.newpipe.player.Player.onBroadcastReceived(Player.java:1123)
at org.schabi.newpipe.player.Player.access$200(Player.java:190)
at org.schabi.newpipe.player.Player$3.onReceive(Player.java:1060)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1185)
... 7 more
AppCompatImageButton ignores "tint" theme attribute on API 19, therefore, they had to be specified directly, these attributes can be removed after the KitKat support is dropped.
It will be shown even when nothing could be loaded not due to a network error, and the user can choose to ignore or report it.
Also improve error reporting arguments
Also completely refactor error activity
Also improve some code here and there