mirror of
https://github.com/YTVanced/VancedManager
synced 2024-12-01 07:23:02 +00:00
update APIs
This commit is contained in:
parent
ce3977c667
commit
a0761554b2
5 changed files with 16 additions and 24 deletions
|
@ -4,6 +4,8 @@ plugins {
|
|||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
val composeVersion = "1.1.0-beta04"
|
||||
|
||||
android {
|
||||
compileSdk = 31
|
||||
|
||||
|
@ -49,7 +51,7 @@ android {
|
|||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.1.0-alpha06"
|
||||
kotlinCompilerExtensionVersion = composeVersion
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,7 +84,7 @@ dependencies {
|
|||
|
||||
// AndroidX
|
||||
implementation("androidx.core:core-ktx:1.7.0")
|
||||
implementation("androidx.appcompat:appcompat:1.3.1")
|
||||
implementation("androidx.appcompat:appcompat:1.4.0")
|
||||
implementation("androidx.browser:browser:1.4.0")
|
||||
implementation("androidx.preference:preference-ktx:1.1.1")
|
||||
implementation("androidx.activity:activity-compose:1.4.0")
|
||||
|
@ -92,13 +94,12 @@ dependencies {
|
|||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion")
|
||||
|
||||
// Compose
|
||||
val composeVersion = "1.1.0-beta03"
|
||||
implementation("androidx.compose.compiler:compiler:$composeVersion")
|
||||
implementation("androidx.compose.foundation:foundation:$composeVersion")
|
||||
implementation("androidx.compose.material:material-icons-core:$composeVersion")
|
||||
implementation("androidx.compose.material:material-icons-extended:$composeVersion")
|
||||
implementation("androidx.compose.material:material:$composeVersion")
|
||||
implementation("androidx.compose.material3:material3:1.0.0-alpha01")
|
||||
implementation("androidx.compose.material3:material3:1.0.0-alpha02")
|
||||
implementation("androidx.compose.runtime:runtime-livedata:$composeVersion")
|
||||
implementation("androidx.compose.ui:ui-tooling:$composeVersion")
|
||||
implementation("androidx.compose.ui:ui-util:$composeVersion")
|
||||
|
|
|
@ -9,7 +9,6 @@ import androidx.compose.ui.Modifier
|
|||
@Composable
|
||||
fun ManagerScaffold(
|
||||
modifier: Modifier = Modifier,
|
||||
scaffoldState: ScaffoldState = rememberScaffoldState(),
|
||||
topBar: @Composable () -> Unit = {},
|
||||
floatingActionButton: @Composable () -> Unit = {},
|
||||
floatingActionButtonPosition: FabPosition = FabPosition.End,
|
||||
|
@ -22,7 +21,6 @@ fun ManagerScaffold(
|
|||
// ) {
|
||||
Scaffold(
|
||||
modifier = modifier,
|
||||
scaffoldState = scaffoldState,
|
||||
topBar = topBar,
|
||||
floatingActionButton = floatingActionButton,
|
||||
floatingActionButtonPosition = floatingActionButtonPosition,
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.Checkbox
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vanced.manager.ui.component.color.managerTextColor
|
||||
import com.vanced.manager.ui.component.list.ManagerSelectableListItem
|
||||
import com.vanced.manager.ui.component.modifier.managerClickable
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.widget.checkbox.ManagerAnimatedCheckbox
|
||||
|
||||
@Composable
|
||||
fun CheckboxItem(
|
||||
|
@ -31,13 +29,12 @@ fun CheckboxItem(
|
|||
)
|
||||
},
|
||||
trailing = {
|
||||
ManagerAnimatedCheckbox(
|
||||
size = 24.dp,
|
||||
shape = CircleShape,
|
||||
isChecked = isChecked
|
||||
) {
|
||||
toggle()
|
||||
}
|
||||
Checkbox(
|
||||
checked = isChecked,
|
||||
onCheckedChange = {
|
||||
toggle()
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
|
@ -1,15 +1,13 @@
|
|||
package com.vanced.manager.ui.widget.list
|
||||
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.RadioButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vanced.manager.ui.component.color.managerTextColor
|
||||
import com.vanced.manager.ui.component.list.ManagerSelectableListItem
|
||||
import com.vanced.manager.ui.component.modifier.managerClickable
|
||||
import com.vanced.manager.ui.component.text.ManagerText
|
||||
import com.vanced.manager.ui.widget.radiobutton.ManagerAnimatedRadiobutton
|
||||
|
||||
@Composable
|
||||
fun <T> RadiobuttonItem(
|
||||
|
@ -31,10 +29,8 @@ fun <T> RadiobuttonItem(
|
|||
)
|
||||
},
|
||||
trailing = {
|
||||
ManagerAnimatedRadiobutton(
|
||||
size = 24.dp,
|
||||
shape = CircleShape,
|
||||
isSelected = isSelected,
|
||||
RadioButton(
|
||||
selected = isSelected,
|
||||
onClick = onClick
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
|
||||
val kotlinVersion = "1.5.31"
|
||||
val kotlinVersion = "1.6.0"
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:7.0.3")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||
|
|
Loading…
Reference in a new issue