some changes

better manga title/list name view
This commit is contained in:
aayush262 2023-12-10 23:42:56 +05:30
parent d404202371
commit c7bc6241dc
6 changed files with 54 additions and 76 deletions

View file

@ -1101,7 +1101,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
if (settings.cursedSpeeds) if (settings.cursedSpeeds)
arrayOf(1f, 1.25f, 1.5f, 1.75f, 2f, 2.5f, 3f, 4f, 5f, 10f, 25f, 50f) arrayOf(1f, 1.25f, 1.5f, 1.75f, 2f, 2.5f, 3f, 4f, 5f, 10f, 25f, 50f)
else else
arrayOf(0.25f, 0.33f, 0.5f, 0.66f, 0.75f, 1f, 1.25f, 1.33f, 1.5f, 1.66f, 1.75f, 2f) arrayOf(0.25f, 0.33f, 0.5f, 0.66f, 0.75f, 1f, 1.15f, 1.25f, 1.33f, 1.5f, 1.66f, 1.75f, 2f)
val speedsName = speeds.map { "${it}x" }.toTypedArray() val speedsName = speeds.map { "${it}x" }.toTypedArray()
var curSpeed = loadData("${media.id}_speed", this) ?: settings.defaultSpeed var curSpeed = loadData("${media.id}_speed", this) ?: settings.defaultSpeed

View file

@ -97,7 +97,7 @@ class PlayerSettingsActivity : AppCompatActivity() {
val speeds = val speeds =
arrayOf(0.25f, 0.33f, 0.5f, 0.66f, 0.75f, 1f, 1.25f, 1.33f, 1.5f, 1.66f, 1.75f, 2f) arrayOf(0.25f, 0.33f, 0.5f, 0.66f, 0.75f, 1f, 1.15f, 1.25f, 1.33f, 1.5f, 1.66f, 1.75f, 2f)
val cursedSpeeds = arrayOf(1f, 1.25f, 1.5f, 1.75f, 2f, 2.5f, 3f, 4f, 5f, 10f, 25f, 50f) val cursedSpeeds = arrayOf(1f, 1.25f, 1.5f, 1.75f, 2f, 2.5f, 3f, 4f, 5f, 10f, 25f, 50f)
var curSpeedArr = if (settings.cursedSpeeds) cursedSpeeds else speeds var curSpeedArr = if (settings.cursedSpeeds) cursedSpeeds else speeds
var speedsName = curSpeedArr.map { "${it}x" }.toTypedArray() var speedsName = curSpeedArr.map { "${it}x" }.toTypedArray()

View file

@ -1,4 +1,4 @@
<vector android:height="24dp" android:viewportHeight="24" <vector android:height="24dp" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:viewportWidth="24" android:width="24dp" android:tint="?attr/colorControlNormal" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/> <path android:fillColor="#000000" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector> </vector>

View file

@ -28,21 +28,19 @@
<TextView <TextView
android:id="@+id/listTitle" android:id="@+id/listTitle"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginStart="16dp" android:layout_marginStart="32dp"
android:fontFamily="@font/poppins_bold" android:fontFamily="@font/poppins_bold"
android:gravity="center" android:gravity="center|start"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title" android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textSize="16sp" android:textSize="16sp"
android:singleLine="true"
android:textColor="?attr/colorOnBackground" android:textColor="?attr/colorOnBackground"
android:ellipsize="end"
tools:text="@string/app_name" /> tools:text="@string/app_name" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageButton <ImageButton
android:id="@+id/random" android:id="@+id/random"
android:layout_width="48dp" android:layout_width="48dp"

View file

@ -30,10 +30,8 @@
android:text="@string/play_yt" android:text="@string/play_yt"
android:textColor="@color/bg_white" android:textColor="@color/bg_white"
android:fontFamily="@font/poppins_bold" android:fontFamily="@font/poppins_bold"
android:visibility="gone"
app:cornerRadius="12dp" app:cornerRadius="12dp"
app:icon="@drawable/ic_round_play_circle_24" app:icon="@drawable/ic_round_play_circle_24"
app:iconTint="?attr/colorOnSecondaryContainer"
tools:ignore="TextContrastCheck" /> tools:ignore="TextContrastCheck" />
<TextView <TextView

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -8,60 +8,61 @@
android:background="@drawable/card_outline" android:background="@drawable/card_outline"
app:cardCornerRadius="12dp"> app:cardCornerRadius="12dp">
<LinearLayout <com.google.android.material.appbar.AppBarLayout
android:layout_width="312dp" android:id="@+id/listAppBar"
android:layout_height="48dp" android:layout_width="match_parent"
android:layout_marginStart="16dp" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:background="?attr/colorSurface"
android:layout_marginEnd="16dp" android:theme="@style/Theme.Dantotsu.AppBarOverlay">
android:layout_marginBottom="8dp"
android:gravity="center_vertical"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="70dp"
android:gravity="center" android:orientation="horizontal"
android:orientation="horizontal"> android:gravity="center">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="@font/poppins_bold"
android:singleLine="true"
android:text=""
android:textSize="14dp"
tools:ignore="SpUsage" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_bold"
android:text=""
android:textSize="14dp"
tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/itemChapterNumber" android:id="@+id/itemChapterNumber"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_weight="1"
android:ellipsize="end" android:layout_height="48dp"
android:layout_marginStart="10dp"
android:fontFamily="@font/poppins_bold" android:fontFamily="@font/poppins_bold"
android:maxWidth="250dp" android:gravity="center|start"
android:paddingEnd="8dp" android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textSize="16sp"
android:singleLine="true" android:singleLine="true"
android:textSize="14dp" android:textColor="?attr/colorOnBackground"
tools:ignore="SpUsage" android:ellipsize="end"
tools:text="1" /> tools:text="1" />
</LinearLayout> <ImageButton
android:id="@+id/itemEpisodeViewed"
android:layout_width="24dp"
android:layout_height="48dp"
android:layout_marginEnd="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/random_selection"
app:tint="?attr/colorOnBackground"
app:srcCompat="@drawable/ic_round_remove_red_eye_24" />
<ImageButton
android:id="@+id/itemDownload"
android:layout_width="24dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/sort_by"
app:tint="?attr/colorOnBackground"
app:srcCompat="@drawable/ic_round_download_24" />
</LinearLayout>
<TextView <TextView
android:id="@+id/itemChapterTitle" android:id="@+id/itemChapterTitle"
android:layout_width="312dp" android:layout_width="312dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="-10dp"
android:layout_marginBottom="10dp"
android:alpha="0.66" android:alpha="0.66"
android:ellipsize="end" android:ellipsize="end"
android:fontFamily="@font/poppins_bold" android:fontFamily="@font/poppins_bold"
@ -69,17 +70,7 @@
android:textSize="14dp" android:textSize="14dp"
android:visibility="gone" android:visibility="gone"
tools:ignore="SpUsage" /> tools:ignore="SpUsage" />
</com.google.android.material.appbar.AppBarLayout>
</LinearLayout>
<ImageView
android:id="@+id/itemDownload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="8dp"
app:srcCompat="@drawable/ic_round_download_24"
tools:ignore="ContentDescription" />
<View <View
android:id="@+id/itemEpisodeViewedCover" android:id="@+id/itemEpisodeViewedCover"
@ -89,13 +80,4 @@
android:background="?android:colorBackground" android:background="?android:colorBackground"
android:visibility="gone" /> android:visibility="gone" />
<ImageView </androidx.cardview.widget.CardView>
android:id="@+id/itemEpisodeViewed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="40dp"
app:srcCompat="@drawable/ic_round_remove_red_eye_24"
tools:ignore="ContentDescription" />
</androidx.cardview.widget.CardView>