mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
bit of material3
This commit is contained in:
parent
9fb4b74b79
commit
96c074e87b
6 changed files with 30 additions and 15 deletions
|
@ -533,10 +533,10 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
|||
.setPopUpTo(navController.graph.startDestination, false)
|
||||
.build()*/
|
||||
nav_view?.setupWithNavController(navController)
|
||||
val navRail = findViewById<NavigationRailView?>(R.id.nav_rail_view)
|
||||
navRail?.setupWithNavController(navController)
|
||||
val nav_rail = findViewById<NavigationRailView?>(R.id.nav_rail_view)
|
||||
nav_rail?.setupWithNavController(navController)
|
||||
|
||||
navRail?.setOnItemSelectedListener { item ->
|
||||
nav_rail?.setOnItemSelectedListener { item ->
|
||||
onNavDestinationSelected(
|
||||
item,
|
||||
navController
|
||||
|
@ -574,7 +574,9 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
|||
|
||||
val rippleColor = ColorStateList.valueOf(getResourceColor(R.attr.colorPrimary, 0.1f))
|
||||
nav_view?.itemRippleColor = rippleColor
|
||||
navRail?.itemRippleColor = rippleColor
|
||||
nav_rail?.itemRippleColor = rippleColor
|
||||
nav_rail?.itemActiveIndicatorColor = rippleColor
|
||||
nav_view?.itemActiveIndicatorColor = rippleColor
|
||||
|
||||
if (!checkWrite()) {
|
||||
requestRW()
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
|||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.marginEnd
|
||||
import com.lagradost.cloudstream3.R
|
||||
import kotlin.math.max
|
||||
|
||||
|
@ -36,7 +37,7 @@ class FlowLayout : ViewGroup {
|
|||
val childHeight = child.measuredHeight
|
||||
|
||||
//check if child can be placed in the current row, else go to next line
|
||||
if (currentChildHookPointx + childWidth > realWidth && i + 1 < childCount) {
|
||||
if (currentChildHookPointx + childWidth - child.marginEnd - child.paddingEnd - itemSpacing > realWidth) {
|
||||
//new line
|
||||
currentWidth = max(currentWidth, currentChildHookPointx)
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8,9h8v10L8,19L8,9zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/white"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
android:width="24dp">
|
||||
<path
|
||||
android:fillColor="?white"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8,9h8v10L8,19L8,9zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z" />
|
||||
</vector>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M2,20h20v-4L2,16v4zM4,17h2v2L4,19v-2zM2,4v4h20L22,4L2,4zM6,7L4,7L4,5h2v2zM2,14h20v-4L2,10v4zM4,11h2v2L4,13v-2z"/>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/white"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24"
|
||||
android:width="24dp">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M2,20h20v-4L2,16v4zM4,17h2v2L4,19v-2zM2,4v4h20L22,4L2,4zM6,7L4,7L4,5h2v2zM2,14h20v-4L2,10v4zM4,11h2v2L4,13v-2z" />
|
||||
</vector>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
android:id="@+id/nav_rail_view"
|
||||
android:background="?attr/primaryGrayBackground"
|
||||
app:itemTextColor="@color/item_select_color"
|
||||
|
||||
app:itemIconTint="@color/item_select_color"
|
||||
app:menuGravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar">
|
||||
<!-- Base application theme. Material3 -->
|
||||
<style name="AppTheme" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash_background</item>
|
||||
<item name="android:navigationBarColor">?attr/primaryBlackBackground</item>
|
||||
<item name="android:colorEdgeEffect">?attr/textColor</item>
|
||||
|
@ -404,6 +404,7 @@
|
|||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="textColor">@color/textColor</item>
|
||||
<item name="android:textColor">@color/textColor</item>
|
||||
<item name="android:layout_margin">2dp</item>
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in a new issue