Drop compose material
Material3 is already present so legacy material is redundant
This commit is contained in:
parent
68c0724a52
commit
3980d2729b
4 changed files with 4 additions and 8 deletions
|
@ -17,8 +17,8 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.CircularProgressIndicator
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
|
@ -121,13 +121,11 @@ fun CategoryListItem(category: Category, balance: Long?, onClick: (Category) ->
|
|||
Spacer(modifier = Modifier.height(8.dp))
|
||||
balance?.let {
|
||||
val denominator = remember { max(abs(it), abs(category.amount)).toFloat() }
|
||||
val progress =
|
||||
remember { if (denominator == 0f) 0f else abs(it).toFloat() / denominator }
|
||||
LinearProgressIndicator(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clip(RoundedCornerShape(4.dp)),
|
||||
progress = progress,
|
||||
progress = { if (denominator == 0f) 0f else abs(it).toFloat() / denominator },
|
||||
color = if (category.expense) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.primary,
|
||||
trackColor = Color.LightGray
|
||||
)
|
||||
|
|
|
@ -13,8 +13,8 @@ import androidx.compose.foundation.layout.heightIn
|
|||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.CircularProgressIndicator
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
|
|
|
@ -16,7 +16,7 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.foundation.shape.CornerSize
|
||||
import androidx.compose.material.CircularProgressIndicator
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
|
@ -31,7 +31,6 @@ androidx-test-runner = { module = "androidx.test:runner", version.ref = "android
|
|||
androidx-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidx-test-orchestrator" }
|
||||
compose-activity = { module = "androidx.activity:activity-compose", version = "1.8.2" }
|
||||
compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose-compiler" }
|
||||
compose-material = { module = "androidx.compose.material:material", version.ref = "compose-material" }
|
||||
compose-material-icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose-material" }
|
||||
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
|
||||
compose-material3-window = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "compose-material3" }
|
||||
|
@ -71,7 +70,6 @@ test-ext = { module = "androidx.test.ext:junit", version = "1.1.5" }
|
|||
[bundles]
|
||||
compose = [
|
||||
"compose-activity",
|
||||
"compose-material",
|
||||
"compose-material-icons",
|
||||
"compose-material3",
|
||||
"compose-material3-window",
|
||||
|
|
Loading…
Reference in a new issue