Merge pull request #2483 from Bnyro/master

Remove the CircleImageView dependency
This commit is contained in:
Bnyro 2022-12-23 14:57:50 +01:00 committed by GitHub
commit 6974648fab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 205 additions and 132 deletions

View File

@ -102,7 +102,6 @@ dependencies {
/* Design */
implementation libs.material
implementation libs.circleimageview
/* ExoPlayer */
implementation libs.exoplayer

View File

@ -19,6 +19,7 @@
<application
android:name=".LibreTubeApp"
android:allowBackup="true"
android:banner="@mipmap/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
@ -27,8 +28,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/StartupTheme"
tools:targetApi="n"
android:banner="@mipmap/ic_launcher">
tools:targetApi="n">
<activity
android:name=".ui.activities.NoInternetActivity"
@ -68,7 +68,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
@ -91,7 +92,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -114,7 +116,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -137,7 +140,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -160,7 +164,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -181,7 +186,8 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -204,7 +210,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -227,7 +234,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>
@ -250,7 +258,8 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity-alias>

View File

@ -29,7 +29,8 @@ import kotlinx.coroutines.runBlocking
import retrofit2.HttpException
object PlaylistsHelper {
private val pipedPlaylistRegex = "[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}".toRegex()
private val pipedPlaylistRegex =
"[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}".toRegex()
private val token get() = PreferenceHelper.getToken()

View File

@ -1,4 +1,3 @@
package com.github.libretube.db.obj
import androidx.room.Entity

View File

@ -66,7 +66,8 @@ class CommentsAdapter(
commentorImage.scaleY = REPLIES_ADAPTER_SCALE
}
commentInfos.text = comment.author.toString() + TextUtils.SEPARATOR + comment.commentedTime.toString()
commentInfos.text =
comment.author.toString() + TextUtils.SEPARATOR + comment.commentedTime.toString()
commentText.text = HtmlCompat.fromHtml(
comment.commentText.toString(),
HtmlCompat.FROM_HTML_MODE_LEGACY

View File

@ -68,7 +68,11 @@ class VideosAdapter(
viewType == CAUGHT_UP_TYPE -> VideosViewHolder(
AllCaughtUpRowBinding.inflate(layoutInflater, parent, false)
)
forceMode in listOf(ForceMode.TRENDING, ForceMode.RELATED, ForceMode.HOME) -> VideosViewHolder(
forceMode in listOf(
ForceMode.TRENDING,
ForceMode.RELATED,
ForceMode.HOME
) -> VideosViewHolder(
TrendingRowBinding.inflate(layoutInflater, parent, false)
)
forceMode == ForceMode.CHANNEL -> VideosViewHolder(
@ -101,8 +105,9 @@ class VideosAdapter(
}
videoId?.let {
val shouldHide = (holder.trendingRowBinding?.watchProgress ?: holder.videoRowBinding!!.watchProgress)
.setWatchProgressLength(it, video.duration ?: 0L)
val shouldHide =
(holder.trendingRowBinding?.watchProgress ?: holder.videoRowBinding!!.watchProgress)
.setWatchProgressLength(it, video.duration ?: 0L)
if (hideWatched && shouldHide) {
hideItemView(holder)
return

View File

@ -50,6 +50,7 @@ class BackupDialog(
}
})
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val backupOptions = listOf(
BackupOption.WatchHistory,

View File

@ -107,6 +107,7 @@ class ShareDialog(
}
return ""
}
private fun getShareableTitle(shareData: ShareData): String {
shareData.apply {
currentChannel?.let {

View File

@ -235,7 +235,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
motionLayout: MotionLayout?,
startId: Int,
endId: Int
) {}
) {
}
override fun onTransitionChange(
motionLayout: MotionLayout?,
@ -273,7 +274,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
triggerId: Int,
positive: Boolean,
progress: Float
) {}
) {
}
})
binding.playerMotionLayout.progress = 1.toFloat()
@ -649,7 +651,13 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
setupSeekbarPreview()
if (!isLive) seekToWatchPosition()
exoPlayer.prepare()
if (!PreferenceHelper.getBoolean(PreferenceKeys.DATA_SAVER_MODE, false)) exoPlayer.play()
if (!PreferenceHelper.getBoolean(
PreferenceKeys.DATA_SAVER_MODE,
false
)
) {
exoPlayer.play()
}
if (binding.playerMotionLayout.progress != 1.0f) {
// show controllers when not in picture in picture mode

View File

@ -121,10 +121,12 @@ class PlaylistFragment : BaseFragment() {
binding.playlistName.text = response.name
binding.playlistName.setOnClickListener {
binding.playlistName.maxLines = if (binding.playlistName.maxLines == 2) Int.MAX_VALUE else 2
binding.playlistName.maxLines =
if (binding.playlistName.maxLines == 2) Int.MAX_VALUE else 2
}
binding.playlistInfo.text = (if (response.uploader != null) response.uploader + TextUtils.SEPARATOR else "") +
binding.playlistInfo.text =
(if (response.uploader != null) response.uploader + TextUtils.SEPARATOR else "") +
getString(R.string.videoCount, response.videos.toString())
// show playlist options

View File

@ -66,7 +66,11 @@ class BrightnessHelper(private val activity: Activity) {
* Get scaled brightness with given range. if [saved] is
* ture value will be retrived from shared preferences.
*/
fun getBrightnessWithScale(maxValue: Float, minValue: Float = 0.0f, saved: Boolean = false): Float {
fun getBrightnessWithScale(
maxValue: Float,
minValue: Float = 0.0f,
saved: Boolean = false
): Float {
return if (saved) {
savedBrightness.normalize(minBrightness, maxBrightness, minValue, maxValue)
} else {

View File

@ -64,7 +64,8 @@ class PlayerGestureController(activity: BaseActivity, private val listener: Play
try {
scaleGestureDetector.onTouchEvent(event)
gestureDetector.onTouchEvent(event)
} catch (_: Exception) { }
} catch (_: Exception) {
}
// If video is playing in full-screen mode, then allow `onScroll` to consume
// event and return true.
@ -136,7 +137,8 @@ class PlayerGestureController(activity: BaseActivity, private val listener: Play
if (!isEnabled || scaleGestureDetector.isInProgress) return false
val insideThreshHold = abs(e2.y - e1.y) <= MOVEMENT_THRESHOLD
val insideBorder = (e1.x < BORDER_THRESHOLD || e1.y < BORDER_THRESHOLD || e1.x > width - BORDER_THRESHOLD || e1.y > height - BORDER_THRESHOLD)
val insideBorder =
(e1.x < BORDER_THRESHOLD || e1.y < BORDER_THRESHOLD || e1.x > width - BORDER_THRESHOLD || e1.y > height - BORDER_THRESHOLD)
// If the movement is inside threshold or scroll is horizontal then return false
if (!isMoving && (insideThreshHold || insideBorder || abs(distanceX) > abs(distanceY))) {

View File

@ -1,5 +1,4 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"

View File

@ -3,18 +3,19 @@
android:height="108dp"
android:viewportWidth="1280"
android:viewportHeight="1280">
<group android:scaleX="1.0388889"
android:scaleY="1.0388889"
android:translateX="-24.88889"
android:translateY="-24.88889">
<path
android:pathData="M0,0h1280v1280h-1280z"
android:fillColor="#F2EEFF"/>
<path
android:pathData="M880,639.6C880,637.1 878.6,634.7 876.4,633.4L495,410.4C488.4,406.5 480,411.3 480,419V515.2C480,518.8 481.9,522.1 485.1,523.9L675.1,631.2C681.9,635 681.9,644.8 675.1,648.6L485.1,755.9C481.9,757.7 480,761 480,764.6V860.8C480,868.5 488.4,873.3 495.1,869.4L876.4,645.9C878.6,644.6 880,642.2 880,639.6Z"
android:fillColor="#161316"/>
<path
android:pathData="M614.7,631.1C621.4,634.9 621.4,644.7 614.7,648.5L494.9,716.4C488.3,720.2 480,715.3 480,707.7V571.9C480,564.2 488.3,559.4 494.9,563.2L614.7,631.1Z"
android:fillColor="#161316"/>
</group>
<group
android:scaleX="1.0388889"
android:scaleY="1.0388889"
android:translateX="-24.88889"
android:translateY="-24.88889">
<path
android:fillColor="#F2EEFF"
android:pathData="M0,0h1280v1280h-1280z" />
<path
android:fillColor="#161316"
android:pathData="M880,639.6C880,637.1 878.6,634.7 876.4,633.4L495,410.4C488.4,406.5 480,411.3 480,419V515.2C480,518.8 481.9,522.1 485.1,523.9L675.1,631.2C681.9,635 681.9,644.8 675.1,648.6L485.1,755.9C481.9,757.7 480,761 480,764.6V860.8C480,868.5 488.4,873.3 495.1,869.4L876.4,645.9C878.6,644.6 880,642.2 880,639.6Z" />
<path
android:fillColor="#161316"
android:pathData="M614.7,631.1C621.4,634.9 621.4,644.7 614.7,648.5L494.9,716.4C488.3,720.2 480,715.3 480,707.7V571.9C480,564.2 488.3,559.4 494.9,563.2L614.7,631.1Z" />
</group>
</vector>

View File

@ -7,7 +7,8 @@
android:fillColor="#000"
android:pathData="M1130.145 639.54c0-6.202-3.236-11.865-8.358-14.831L225.77 93.247c-15.64-9.168-35.324 2.157-35.324 20.493v229.194c0 8.629 4.584 16.449 11.864 20.762l446.525 255.619c15.91 9.169 15.91 32.358 0 41.525L202.31 916.46c-7.28 4.315-11.864 12.135-11.864 20.763v228.925c0 18.336 19.684 29.93 35.324 20.493l895.747-532.271c5.122-3.236 8.359-8.898 8.359-14.83h0.269Z"
android:strokeWidth="30"
android:strokeColor="#000"/>
<path android:fillColor="#000"
android:pathData="M373.802 625.518c11.325 6.471 11.325 22.92 0 29.391L174.807 769.507c-11.055 6.47-24.807-1.619-24.807-14.561V525.482c0-12.944 13.752-21.033 24.807-14.562l198.995 114.598Z"/>
android:strokeColor="#000" />
<path
android:fillColor="#000"
android:pathData="M373.802 625.518c11.325 6.471 11.325 22.92 0 29.391L174.807 769.507c-11.055 6.47-24.807-1.619-24.807-14.561V525.482c0-12.944 13.752-21.033 24.807-14.562l198.995 114.598Z" />
</vector>

View File

@ -6,7 +6,7 @@
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M11.707,1.707 L7.414,6 11.707,10.293V7A0.292,0.292 0,0 1,12 6.707c3.468,0 6.293,2.825 6.293,6.293 0,3.468 -2.825,6.293 -6.293,6.293 -3.368,0 -6.107,-2.67 -6.264,-6H4.322C4.479,17.416 7.838,20.707 12,20.707 16.262,20.707 19.707,17.262 19.707,13 19.707,8.738 16.262,5.293 12,5.293A0.292,0.292 0,0 1,11.707 5Z"
android:strokeWidth="0.8"
android:strokeColor="@android:color/black"
android:pathData="M11.707,1.707 L7.414,6 11.707,10.293V7A0.292,0.292 0,0 1,12 6.707c3.468,0 6.293,2.825 6.293,6.293 0,3.468 -2.825,6.293 -6.293,6.293 -3.368,0 -6.107,-2.67 -6.264,-6H4.322C4.479,17.416 7.838,20.707 12,20.707 16.262,20.707 19.707,17.262 19.707,13 19.707,8.738 16.262,5.293 12,5.293A0.292,0.292 0,0 1,11.707 5Z" />
android:strokeColor="@android:color/black" />
</vector>

View File

@ -4,9 +4,9 @@
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M14,9L14,5l8,7 -8,7L14,15S2,14.069 2,19.737C2,8.4 14,9 14,9Z"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#000"/>
<path
android:fillColor="#00000000"
android:pathData="M14,9L14,5l8,7 -8,7L14,15S2,14.069 2,19.737C2,8.4 14,9 14,9Z"
android:strokeWidth="1.5"
android:strokeColor="#000" />
</vector>

View File

@ -23,7 +23,7 @@
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_launcher_round"
app:shapeAppearanceOverlay="@style/CircleImageView" />
app:shapeAppearance="@style/CircleImageView" />
<TextView
android:layout_width="wrap_content"

View File

@ -23,7 +23,7 @@
android:layout_marginTop="30dp"
android:layout_marginBottom="40dp"
android:src="@mipmap/ic_launcher_round"
app:shapeAppearanceOverlay="@style/CircleImageView" />
app:shapeAppearance="@style/CircleImageView" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/telegram"

View File

@ -17,9 +17,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_marginTop="10dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="@string/all_caught_up"
android:textColor="?android:attr/textColorPrimary" />
@ -28,8 +28,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:textSize="13sp"
android:text="@string/all_caught_up_summary"
android:textColor="?attr/colorControlNormal" />
android:textColor="?attr/colorControlNormal"
android:textSize="13sp" />
</LinearLayout>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
@ -8,12 +9,13 @@
android:orientation="vertical"
android:paddingVertical="10dp">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iconIV"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_gravity="center"
android:padding="10dp"
app:shapeAppearance="@style/CircleImageView"
tools:src="@mipmap/ic_gradient" />
<TextView

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/ItemRow">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/search_channel_image"
android:layout_width="70dp"
android:layout_height="70dp"
@ -11,7 +11,8 @@
android:layout_marginStart="50dp"
android:layout_marginEnd="55dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/CircleImageView" />
<LinearLayout
android:id="@+id/search_channel_info"

View File

@ -8,12 +8,13 @@
android:paddingHorizontal="8dp"
android:paddingVertical="4dp">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/subscription_channel_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="8dp" />
android:layout_marginStart="8dp"
app:shapeAppearance="@style/CircleImageView" />
<TextView
android:id="@+id/subscription_channel_name"

View File

@ -23,11 +23,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/commentor_image"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
app:shapeAppearance="@style/CircleImageView"
app:srcCompat="@mipmap/ic_launcher" />
<LinearLayout

View File

@ -33,8 +33,8 @@
<Button
android:id="@+id/create_playlist"
style="@style/CustomDialogButton"
android:text="@string/createPlaylist"
android:layout_marginEnd="8dp"/>
android:layout_marginEnd="8dp"
android:text="@string/createPlaylist" />
<Button
android:id="@+id/addToPlaylist"

View File

@ -31,11 +31,12 @@
android:layout_margin="10dp"
android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/channel_image"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center" />
android:layout_gravity="center"
app:shapeAppearance="@style/CircleImageView" />
<LinearLayout
android:layout_width="0dp"

View File

@ -16,9 +16,9 @@
<ScrollView
android:id="@+id/scroll"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"

View File

@ -192,12 +192,13 @@
android:paddingLeft="8dp"
android:paddingRight="8dp">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/player_channelImage"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginEnd="4dp" />
android:layout_marginEnd="4dp"
app:shapeAppearance="@style/CircleImageView" />
<LinearLayout
android:layout_width="0dp"

View File

@ -81,8 +81,8 @@
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:paddingTop="150dp"
android:orientation="vertical"
android:paddingTop="150dp"
android:visibility="gone">
<ImageView

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
@ -7,11 +8,12 @@
android:paddingHorizontal="4dp"
android:paddingVertical="8dp">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/channel_avatar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center" />
android:layout_gravity="center"
app:shapeAppearance="@style/CircleImageView" />
<TextView
android:id="@+id/channel_name"

View File

@ -17,7 +17,7 @@
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingHorizontal="10dp"
android:src="@drawable/ic_home_outlined"/>
android:src="@drawable/ic_home_outlined" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/checkbox"

View File

@ -90,7 +90,7 @@
app:layout_constraintTop_toBottomOf="@+id/textView_title"
tools:text="Channel Name" />
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/channel_image"
android:layout_width="40dp"
android:layout_height="40dp"
@ -98,6 +98,7 @@
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/thumbnailcard"
app:shapeAppearance="@style/CircleImageView"
app:srcCompat="@mipmap/ic_launcher" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -99,10 +99,11 @@
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@id/video_info">
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/channel_image"
android:layout_width="27dp"
android:layout_height="27dp" />
android:layout_height="27dp"
app:shapeAppearance="@style/CircleImageView" />
<TextView
android:id="@+id/channel_name"

View File

@ -87,14 +87,15 @@
app:layout_constraintStart_toEndOf="@id/thumbnail_card"
app:layout_constraintTop_toBottomOf="@id/video_title" />
<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/channel_image"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@id/video_info" />
app:layout_constraintTop_toBottomOf="@id/video_info"
app:shapeAppearance="@style/CircleImageView" />
<TextView
android:id="@+id/channel_name"

View File

@ -7,10 +7,10 @@
android:title="@string/startpage" />
<item
android:visible="false"
android:id="@+id/trendsFragment"
android:icon="@drawable/ic_trending"
android:title="@string/trends" />
android:title="@string/trends"
android:visible="false" />
<item
android:id="@+id/subscriptionsFragment"
@ -24,8 +24,8 @@
<item
android:id="@+id/downloadsFragment"
android:visible="false"
android:icon="@drawable/ic_download_filled"
android:title="@string/downloads" />
android:title="@string/downloads"
android:visible="false" />
</menu>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_light_background"/>
<foreground android:drawable="@drawable/ic_launcher_light_foreground"/>
<background android:drawable="@color/ic_launcher_light_background" />
<foreground android:drawable="@drawable/ic_launcher_light_foreground" />
</adaptive-icon>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_light_background"/>
<foreground android:drawable="@drawable/ic_launcher_light_foreground"/>
<background android:drawable="@color/ic_launcher_light_background" />
<foreground android:drawable="@drawable/ic_launcher_light_foreground" />
</adaptive-icon>

View File

@ -194,7 +194,8 @@
<item name="colorTertiary">@color/monochrome_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/monochrome_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/monochrome_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/monochrome_theme_dark_onTertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/monochrome_theme_dark_onTertiaryContainer
</item>
<item name="colorError">@color/monochrome_theme_dark_error</item>
<item name="colorErrorContainer">@color/monochrome_theme_dark_errorContainer</item>
<item name="colorOnError">@color/monochrome_theme_dark_onError</item>

View File

@ -299,14 +299,21 @@
<color name="purple_md_theme_dark_surfaceTintColor">#FFACE7</color>
// Colors without comments seem to be not used
<color name="monochrome_theme_light_primary">#616161</color> // LibreTube Logo, Hyperlinks and on-off switch (on status: filling) (also influence on the navbar colour)
<color name="monochrome_theme_light_onPrimary">#FFFFFF</color> // on-off switch (on status: circle)
<color name="monochrome_theme_light_primary">#616161</color>
// LibreTube Logo, Hyperlinks and on-off switch (on status: filling) (also influence on the
navbar colour)
<color name="monochrome_theme_light_onPrimary">#FFFFFF</color>
// on-off switch (on status: circle)
<color name="monochrome_theme_light_primaryContainer">#DCDCDC</color>
<color name="monochrome_theme_light_onPrimaryContainer">#272727</color>
<color name="monochrome_theme_light_secondary">#797979</color> // Headline Text
<color name="monochrome_theme_light_onSecondary">#B39494</color> // SponsorBlock marker
<color name="monochrome_theme_light_secondaryContainer">#DCDCDC</color> // NavBar Icon Container (selected)
<color name="monochrome_theme_light_onSecondaryContainer">#272727</color> // Navbar Icon (selected)
<color name="monochrome_theme_light_secondary">#797979</color>
// Headline Text
<color name="monochrome_theme_light_onSecondary">#B39494</color>
// SponsorBlock marker
<color name="monochrome_theme_light_secondaryContainer">#DCDCDC</color>
// NavBar Icon Container (selected)
<color name="monochrome_theme_light_onSecondaryContainer">#272727</color>
// Navbar Icon (selected)
<color name="monochrome_theme_light_tertiary">#DCDCDC</color>
<color name="monochrome_theme_light_onTertiary">#272727</color>
<color name="monochrome_theme_light_tertiaryContainer">#DCDCDC</color>
@ -315,27 +322,40 @@
<color name="monochrome_theme_light_errorContainer">#DCDCDC</color>
<color name="monochrome_theme_light_onError">#272727</color>
<color name="monochrome_theme_light_onErrorContainer">#272727</color>
<color name="monochrome_theme_light_background">#FFFFFF</color> // Background (Settings and home)
<color name="monochrome_theme_light_background">#FFFFFF</color>
// Background (Settings and home)
<color name="monochrome_theme_light_onBackground">#272727</color>
<color name="monochrome_theme_light_surface">#FFFFFF</color> // Navbar and Flyouts (uses also the "primary" color)
<color name="monochrome_theme_light_onSurface">#272727</color> // NavBar Text (selected) and some Flyout Headlines
<color name="monochrome_theme_light_surfaceVariant">#DCDCDC</color> // on-off switch (off status: filling)
<color name="monochrome_theme_light_onSurfaceVariant">#353535</color> // text in Flyouts, Animation color (subscription button)
<color name="monochrome_theme_light_outline">#797979</color> // on-off switch (off status: border)
<color name="monochrome_theme_light_surface">#FFFFFF</color>
// Navbar and Flyouts (uses also the "primary" color)
<color name="monochrome_theme_light_onSurface">#272727</color>
// NavBar Text (selected) and some Flyout Headlines
<color name="monochrome_theme_light_surfaceVariant">#DCDCDC</color>
// on-off switch (off status: filling)
<color name="monochrome_theme_light_onSurfaceVariant">#353535</color>
// text in Flyouts, Animation color (subscription button)
<color name="monochrome_theme_light_outline">#797979</color>
// on-off switch (off status: border)
<color name="monochrome_theme_light_inverseOnSurface">#DCDCDC</color>
<color name="monochrome_theme_light_inverseSurface">#606060</color>
<color name="monochrome_theme_light_inversePrimary">#C1C1C1</color>
<color name="monochrome_theme_light_shadow">#000000</color>
<color name="monochrome_theme_light_surfaceTint">#717171</color>
<color name="monochrome_theme_light_surfaceTintColor">#717171</color>
<color name="monochrome_theme_dark_primary">#959595</color> // LibreTube Logo, Hyperlinks and on-off switch (on status: filling) (also influence on the navbar colour)
<color name="monochrome_theme_dark_onPrimary">#161616</color> // on-off switch (on status: circle)
<color name="monochrome_theme_dark_primary">#959595</color>
// LibreTube Logo, Hyperlinks and on-off switch (on status: filling) (also influence on the
navbar colour)
<color name="monochrome_theme_dark_onPrimary">#161616</color>
// on-off switch (on status: circle)
<color name="monochrome_theme_dark_primaryContainer">#4D4D4D</color>
<color name="monochrome_theme_dark_onPrimaryContainer">#A3A3A3</color>
<color name="monochrome_theme_dark_secondary">#A3A3A3</color> // Headline Text
<color name="monochrome_theme_dark_onSecondary">#886A6A</color> // SponsorBlock marker
<color name="monochrome_theme_dark_secondaryContainer">#4D4D4D</color> // NavBar Icon Container (selected)
<color name="monochrome_theme_dark_onSecondaryContainer">#CCCCCC</color> // Navbar Icon Color (selected)
<color name="monochrome_theme_dark_secondary">#A3A3A3</color>
// Headline Text
<color name="monochrome_theme_dark_onSecondary">#886A6A</color>
// SponsorBlock marker
<color name="monochrome_theme_dark_secondaryContainer">#4D4D4D</color>
// NavBar Icon Container (selected)
<color name="monochrome_theme_dark_onSecondaryContainer">#CCCCCC</color>
// Navbar Icon Color (selected)
<color name="monochrome_theme_dark_tertiary">#4D4D4D</color>
<color name="monochrome_theme_dark_onTertiary">#A3A3A3</color>
<color name="monochrome_theme_dark_tertiaryContainer">#4D4D4D</color>
@ -344,13 +364,19 @@
<color name="monochrome_theme_dark_errorContainer">#4D4D4D</color>
<color name="monochrome_theme_dark_onError">#A3A3A3</color>
<color name="monochrome_theme_dark_onErrorContainer">#A3A3A3</color>
<color name="monochrome_theme_dark_background">#161616</color> // Background (Settings and home)
<color name="monochrome_theme_dark_background">#161616</color>
// Background (Settings and home)
<color name="monochrome_theme_dark_onBackground">#A3A3A3</color>
<color name="monochrome_theme_dark_surface">#161616</color> // Navbar and Flyouts (uses also the "primary" color)
<color name="monochrome_theme_dark_onSurface">#BDBDBD</color> // NavBar Text (selected) and some Flyout Headlines
<color name="monochrome_theme_dark_surfaceVariant">#4D4D4D</color> // on-off switch (off status: filling)
<color name="monochrome_theme_dark_onSurfaceVariant">#A3A3A3</color> // text in Flyouts, Animation color (subscription button)
<color name="monochrome_theme_dark_outline">#A3A3A3</color> // on-off switch (off status: border)
<color name="monochrome_theme_dark_surface">#161616</color>
// Navbar and Flyouts (uses also the "primary" color)
<color name="monochrome_theme_dark_onSurface">#BDBDBD</color>
// NavBar Text (selected) and some Flyout Headlines
<color name="monochrome_theme_dark_surfaceVariant">#4D4D4D</color>
// on-off switch (off status: filling)
<color name="monochrome_theme_dark_onSurfaceVariant">#A3A3A3</color>
// text in Flyouts, Animation color (subscription button)
<color name="monochrome_theme_dark_outline">#A3A3A3</color>
// on-off switch (off status: border)
<color name="monochrome_theme_dark_inverseOnSurface">#404040</color>
<color name="monochrome_theme_dark_inverseSurface">#C3C3C3</color>
<color name="monochrome_theme_dark_inversePrimary">#707070</color>

View File

@ -100,8 +100,8 @@
<item name="android:gravity">bottom</item>
<item name="android:textAlignment">center</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:layout_gravity">bottom</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_gravity">bottom</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
</style>

View File

@ -34,10 +34,9 @@
<PreferenceCategory app:title="@string/time">
<SwitchPreferenceCompat
app:title="@string/notification_time"
android:summary="@string/notification_time_summary"
app:key="notification_time"
/>
app:title="@string/notification_time" />
<com.github.libretube.ui.views.TimePickerPreference
app:key="notification_start_time"

View File

@ -3,47 +3,51 @@
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="25">
<shortcut
android:shortcutId="home"
android:enabled="true"
android:icon="@drawable/ic_home"
android:shortcutId="home"
android:shortcutShortLabel="@string/startpage">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.github.libretube"
android:targetClass="com.github.libretube.ui.activities.MainActivity" />
android:targetClass="com.github.libretube.ui.activities.MainActivity"
android:targetPackage="com.github.libretube" />
</shortcut>
<shortcut
android:shortcutId="trends"
android:enabled="true"
android:icon="@drawable/ic_trending"
android:shortcutId="trends"
android:shortcutShortLabel="@string/trends">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.github.libretube"
android:targetClass="com.github.libretube.ui.activities.MainActivity" />
android:targetClass="com.github.libretube.ui.activities.MainActivity"
android:targetPackage="com.github.libretube" />
</shortcut>
<shortcut
android:shortcutId="subscriptions"
android:enabled="true"
android:icon="@drawable/ic_subscriptions"
android:shortcutId="subscriptions"
android:shortcutShortLabel="@string/subscriptions">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.github.libretube"
android:targetClass="com.github.libretube.ui.activities.MainActivity">
<extra android:name="fragmentToOpen" android:value="subscriptions" />
android:targetClass="com.github.libretube.ui.activities.MainActivity"
android:targetPackage="com.github.libretube">
<extra
android:name="fragmentToOpen"
android:value="subscriptions" />
</intent>
</shortcut>
<shortcut
android:shortcutId="library"
android:enabled="true"
android:icon="@drawable/ic_library"
android:shortcutId="library"
android:shortcutShortLabel="@string/library">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.github.libretube"
android:targetClass="com.github.libretube.ui.activities.MainActivity">
<extra android:name="fragmentToOpen" android:value="library" />
android:targetClass="com.github.libretube.ui.activities.MainActivity"
android:targetPackage="com.github.libretube">
<extra
android:name="fragmentToOpen"
android:value="library" />
</intent>
</shortcut>
</shortcuts>

View File

@ -9,7 +9,6 @@ preference = "1.2.0"
extJunit = "1.1.4"
espresso = "3.5.0"
workRuntime = "2.7.1"
circleimageview = "3.1.0"
exoplayer = "2.18.2"
multidex = "2.0.1"
retrofit = "2.9.0"
@ -32,7 +31,6 @@ androidx-preference = { group = "androidx.preference", name = "preference-ktx",
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "extJunit" }
androidx-test-espressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
androidx-work-runtime = { group = "androidx.work", name="work-runtime-ktx", version.ref="workRuntime" }
circleimageview = { group = "de.hdodenhof", name = "circleimageview", version.ref = "circleimageview" }
exoplayer = { group = "com.google.android.exoplayer", name = "exoplayer", version.ref = "exoplayer" }
exoplayer-extension-mediasession = { group = "com.google.android.exoplayer", name = "extension-mediasession", version.ref = "exoplayer" }
androidx-multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" }