mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
commit
45b85b8dfb
@ -892,7 +892,7 @@ class PlayerFragment : Fragment() {
|
||||
}
|
||||
|
||||
if (response.hls != null) {
|
||||
binding.relPlayerVlc.setOnClickListener {
|
||||
binding.relPlayerOpen.setOnClickListener {
|
||||
// start an intent with video as mimetype using the hls stream
|
||||
val uri: Uri = Uri.parse(response.hls)
|
||||
val intent = Intent()
|
||||
@ -904,7 +904,11 @@ class PlayerFragment : Fragment() {
|
||||
intent.putExtra("artist", uploader)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
|
||||
startActivity(intent)
|
||||
try {
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(context, R.string.no_player_found, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (relatedStreamsEnabled) {
|
||||
|
@ -72,7 +72,6 @@ class SubscriptionsFragment : Fragment() {
|
||||
var loadedSubbedChannels = false
|
||||
|
||||
binding.toggleSubs.setOnClickListener {
|
||||
binding.toggle.animate().rotationBy(180F).setDuration(100).start()
|
||||
if (!binding.subChannels.isVisible) {
|
||||
if (!loadedSubbedChannels) {
|
||||
binding.subChannels.layoutManager = LinearLayoutManager(context)
|
||||
|
@ -16,7 +16,6 @@ import com.github.libretube.R
|
||||
import com.github.libretube.WEBSITE_URL
|
||||
import com.github.libretube.activities.SettingsActivity
|
||||
import com.github.libretube.databinding.FragmentAboutBinding
|
||||
import com.github.libretube.util.ThemeHelper.getThemeColor
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
||||
@ -94,10 +93,6 @@ class AboutFragment : Fragment() {
|
||||
val snackBar = Snackbar
|
||||
.make(binding.root, text, Snackbar.LENGTH_LONG)
|
||||
|
||||
// set snackBar color
|
||||
snackBar.setBackgroundTint(getThemeColor(requireContext(), R.attr.colorSurface))
|
||||
snackBar.setTextColor(getThemeColor(requireContext(), R.attr.colorPrimary))
|
||||
|
||||
// prevent the text from being partially hidden
|
||||
snackBar.setTextMaxLines(3)
|
||||
|
||||
|
@ -185,7 +185,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/relPlayer_vlc"
|
||||
android:id="@+id/relPlayer_open"
|
||||
style="@style/PlayerActionsLayout">
|
||||
|
||||
<ImageView
|
||||
@ -265,7 +265,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
android:textSize="15dp" />
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@ -301,7 +301,7 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="18dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
@ -309,25 +309,22 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/commentsToggle_textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/comments"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/commentsToggle_imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@drawable/ic_arrow_up_down"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:src="@drawable/ic_arrow_up_down" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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="match_parent"
|
||||
@ -53,53 +54,57 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toggle_subs"
|
||||
style="@style/Widget.Material3.CardView.Elevated"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:visibility="gone">
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="18dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/subscriptions" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@drawable/ic_arrow_down" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sub_channels"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/subscriptions"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@drawable/ic_arrow_up_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sub_channels"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sub_feed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</RelativeLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sub_feed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.github.libretube.views.CustomSwipeToRefresh>
|
||||
|
@ -241,4 +241,5 @@
|
||||
<string name="autoRotatePlayer_summary">Automatically switch to player fullscreen when the device gets turned.</string>
|
||||
<string name="pure_theme">Pure theme</string>
|
||||
<string name="pure_theme_summary">Pure white/black theme</string>
|
||||
<string name="no_player_found">No external player found. Please make sure you have one installed.</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user