mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 03:35:08 +01:00
Update tablet UI
- Only used when width is >= 720dp instead of 600dp (typically 10" tablets) - Fix fastscroll in manga view (fixes #5267)
This commit is contained in:
parent
6c53bb4d51
commit
b03ebc1fa4
@ -156,7 +156,7 @@ dependencies {
|
||||
implementation("androidx.work:work-runtime-ktx:2.7.0-alpha04")
|
||||
|
||||
// UI library
|
||||
implementation("com.google.android.material:material:1.4.0-beta01")
|
||||
implementation("com.google.android.material:material:1.4.0-rc01")
|
||||
|
||||
"standardImplementation"("com.google.firebase:firebase-core:19.0.0")
|
||||
|
||||
|
@ -271,8 +271,8 @@ fun Context.createFileInCacheDir(name: String): File {
|
||||
}
|
||||
|
||||
/**
|
||||
* We consider anything with a width of >= 600dp as a tablet, i.e. with layouts in layout-sw600dp.
|
||||
* We consider anything with a width of >= 720dp as a tablet, i.e. with layouts in layout-w720dp.
|
||||
*/
|
||||
fun Context.isTablet(): Boolean {
|
||||
return resources.configuration.screenWidthDp >= 600
|
||||
return (resources.displayMetrics.widthPixels / resources.displayMetrics.density) >= 720
|
||||
}
|
||||
|
@ -75,6 +75,7 @@
|
||||
style="@style/Widget.MaterialComponents.NavigationRailView.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
app:elevation="0dp"
|
||||
app:itemIconTint="@color/nav_selector"
|
||||
app:itemRippleColor="?attr/rippleSecondaryColor"
|
||||
app:itemTextColor="@color/nav_selector"
|
@ -50,18 +50,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/chapters_item" />
|
||||
|
||||
<eu.kanade.tachiyomi.widget.MaterialFastScroll
|
||||
android:id="@+id/fast_scroller"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="end"
|
||||
app:fastScrollerBubbleEnabled="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<eu.kanade.tachiyomi.widget.ActionToolbar
|
||||
android:id="@+id/action_toolbar"
|
||||
android:layout_width="0dp"
|
||||
@ -76,4 +64,13 @@
|
||||
|
||||
</eu.kanade.tachiyomi.widget.ThemedSwipeRefreshLayout>
|
||||
|
||||
<eu.kanade.tachiyomi.widget.MaterialFastScroll
|
||||
android:id="@+id/fast_scroller"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="end"
|
||||
app:fastScrollerBubbleEnabled="false"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
Loading…
Reference in New Issue
Block a user