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