mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
commit
5a7d1d9ce5
@ -21,7 +21,7 @@
|
||||
android:largeHeap="true"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
<activity
|
||||
android:name=".Player"
|
||||
android:name=".util.Player"
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||
android:configChanges="orientation|screenSize" />
|
||||
|
@ -70,9 +70,8 @@ class SearchViewHolder(
|
||||
val thumbnailImage = v.findViewById<ImageView>(R.id.search_thumbnail)
|
||||
Picasso.get().load(item.thumbnail).fit().centerCrop().into(thumbnailImage)
|
||||
val thumbnailDuration = v.findViewById<TextView>(R.id.search_thumbnail_duration)
|
||||
val itemDuration = DateUtils.formatElapsedTime(item.duration!!)
|
||||
if (itemDuration != "00:-1") {
|
||||
thumbnailDuration.text = itemDuration
|
||||
if (item.duration != -1L) {
|
||||
thumbnailDuration.text = DateUtils.formatElapsedTime(item.duration!!)
|
||||
} else {
|
||||
thumbnailDuration.text = v.context.getString(R.string.live)
|
||||
thumbnailDuration.setBackgroundColor(R.attr.colorPrimaryDark)
|
||||
|
@ -54,9 +54,8 @@ class SubscriptionAdapter(
|
||||
DateUtils.getRelativeTimeSpanString(trending.uploaded!!)
|
||||
val thumbnailImage = holder.v.findViewById<ImageView>(R.id.thumbnail)
|
||||
val thumbnailDuration = holder.v.findViewById<TextView>(R.id.thumbnail_duration)
|
||||
val itemDuration = DateUtils.formatElapsedTime(trending.duration!!)
|
||||
if (itemDuration != "00:-1") {
|
||||
thumbnailDuration.text = itemDuration
|
||||
if (trending.duration != -1L) {
|
||||
thumbnailDuration.text = DateUtils.formatElapsedTime(trending.duration!!)
|
||||
} else {
|
||||
thumbnailDuration.text = holder.v.context.getString(R.string.live)
|
||||
thumbnailDuration.setBackgroundColor(R.attr.colorPrimaryDark)
|
||||
|
@ -43,9 +43,8 @@ class TrendingAdapter(
|
||||
DateUtils.getRelativeTimeSpanString(trending.uploaded!!)
|
||||
val thumbnailImage = holder.v.findViewById<ImageView>(R.id.thumbnail)
|
||||
val thumbnailDuration = holder.v.findViewById<TextView>(R.id.thumbnail_duration)
|
||||
val itemDuration = DateUtils.formatElapsedTime(trending.duration!!)
|
||||
if (itemDuration != "00:-1") {
|
||||
thumbnailDuration.text = itemDuration
|
||||
if (trending.duration != -1L) {
|
||||
thumbnailDuration.text = DateUtils.formatElapsedTime(trending.duration!!)
|
||||
} else {
|
||||
thumbnailDuration.text = holder.v.context.getString(R.string.live)
|
||||
thumbnailDuration.setBackgroundColor(R.attr.colorPrimaryDark)
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.libretube
|
||||
package com.github.libretube.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
@ -14,6 +14,7 @@ import androidx.preference.PreferenceManager
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.adapters.TrendingAdapter
|
||||
import com.github.libretube.util.RetrofitInstance
|
||||
import java.io.IOException
|
@ -1,4 +1,4 @@
|
||||
package com.github.libretube
|
||||
package com.github.libretube.fragments
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
@ -14,6 +14,7 @@ import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.adapters.PlaylistsAdapter
|
||||
import com.github.libretube.dialogs.CreatePlaylistDialog
|
||||
import com.github.libretube.util.RetrofitInstance
|
@ -1,4 +1,4 @@
|
||||
package com.github.libretube
|
||||
package com.github.libretube.fragments
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
@ -23,6 +23,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.adapters.SubscriptionAdapter
|
||||
import com.github.libretube.adapters.SubscriptionChannelAdapter
|
||||
import com.github.libretube.util.RetrofitInstance
|
@ -32,6 +32,7 @@ class AboutFragment : Fragment() {
|
||||
|
||||
val appVersion = view?.findViewById<TextView>(R.id.app_version)
|
||||
appVersion.text = BuildConfig.VERSION_NAME
|
||||
|
||||
val website = view?.findViewById<MaterialCardView>(R.id.website)
|
||||
website?.setOnClickListener {
|
||||
openLink("https://libre-tube.github.io/")
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.github.libretube
|
||||
package com.github.libretube.util
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import com.github.libretube.R
|
||||
import com.google.android.material.color.DynamicColors
|
||||
|
||||
class Player : Activity() {
|
@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Player"
|
||||
tools:context=".util.Player"
|
||||
android:background="@android:color/black">
|
||||
|
||||
<com.github.libretube.util.CustomExoPlayerView
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:id="@+id/back_imageButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:src="@drawable/ic_arrow_back" />
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Home">
|
||||
tools:context=".fragments.Home">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Library">
|
||||
tools:context=".fragments.Library">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/loginOrRegister2"
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Subscriptions">
|
||||
tools:context=".fragments.Subscriptions">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/sub_progress"
|
||||
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -7,17 +7,17 @@
|
||||
|
||||
<fragment
|
||||
android:id="@+id/home2"
|
||||
android:name="com.github.libretube.Home"
|
||||
android:name="com.github.libretube.fragments.Home"
|
||||
android:label="fragment_home"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
<fragment
|
||||
android:id="@+id/subscriptions"
|
||||
android:name="com.github.libretube.Subscriptions"
|
||||
android:name="com.github.libretube.fragments.Subscriptions"
|
||||
android:label="fragment_subscriptions"
|
||||
tools:layout="@layout/fragment_subscriptions" />
|
||||
<fragment
|
||||
android:id="@+id/library"
|
||||
android:name="com.github.libretube.Library"
|
||||
android:name="com.github.libretube.fragments.Library"
|
||||
android:label="fragment_library"
|
||||
tools:layout="@layout/fragment_library"></fragment>
|
||||
<fragment
|
||||
|
Loading…
x
Reference in New Issue
Block a user