Bump compose-material3 to latest alpha

The library hasn't hit a stable release in over an year by now

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-06-18 15:47:46 +08:00
parent 2bffcafed5
commit a37485080f
10 changed files with 51 additions and 50 deletions

View File

@@ -5,18 +5,19 @@
package com.aurora.extensions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.adaptive.WindowAdaptiveInfo
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
import androidx.window.core.layout.WindowWidthSizeClass
import com.aurora.store.R
/**
* Returns navigation icon for adaptive screens such as extra pane
*/
val WindowAdaptiveInfo.adaptiveNavigationIcon: ImageVector
val WindowAdaptiveInfo.adaptiveNavigationIcon: Painter
@Composable
get() = when (windowSizeClass.windowWidthSizeClass) {
WindowWidthSizeClass.COMPACT -> Icons.AutoMirrored.Filled.ArrowBack
else -> Icons.Default.Close
WindowWidthSizeClass.COMPACT -> painterResource(R.drawable.ic_arrow_back)
else -> painterResource(R.drawable.ic_cancel)
}

View File

@@ -10,9 +10,6 @@ import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -28,6 +25,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.tooling.preview.Preview
@@ -78,7 +76,7 @@ fun SearchAppBarComposable(
navigationIcon = {
IconButton(onClick = onNavigateUp) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
painter = painterResource(R.drawable.ic_arrow_back),
contentDescription = null
)
}
@@ -92,7 +90,7 @@ fun SearchAppBarComposable(
focusManager.clearFocus(force = true)
}
) {
Icon(imageVector = Icons.Default.Clear, contentDescription = null)
Icon(painter = painterResource(R.drawable.ic_cancel), contentDescription = null)
}
}
actions()

View File

@@ -6,8 +6,6 @@
package com.aurora.store.compose.composables
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -15,7 +13,8 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.aurora.store.R
@@ -33,7 +32,7 @@ import com.aurora.store.R
fun TopAppBarComposable(
modifier: Modifier = Modifier,
title: String? = null,
navigationIcon: ImageVector = Icons.AutoMirrored.Filled.ArrowBack,
navigationIcon: Painter = painterResource(R.drawable.ic_arrow_back),
onNavigateUp: (() -> Unit)? = null,
actions: @Composable (RowScope.() -> Unit) = {}
) {
@@ -43,7 +42,7 @@ fun TopAppBarComposable(
navigationIcon = {
if (onNavigateUp != null) {
IconButton(onClick = onNavigateUp) {
Icon(imageVector = navigationIcon, contentDescription = null)
Icon(painter = navigationIcon, contentDescription = null)
}
}
},

View File

@@ -6,8 +6,6 @@
package com.aurora.store.compose.menu
import androidx.compose.foundation.layout.Box
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon
@@ -70,7 +68,10 @@ fun AppDetailsMenu(
Box(modifier = modifier) {
IconButton(onClick = { expanded = true }) {
Icon(Icons.Default.MoreVert, contentDescription = stringResource(R.string.menu))
Icon(
painter = painterResource(R.drawable.ic_more_vert),
contentDescription = stringResource(R.string.menu)
)
}
DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
DropdownMenuItem(

View File

@@ -6,8 +6,6 @@
package com.aurora.store.compose.menu
import androidx.compose.foundation.layout.Box
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon
@@ -19,6 +17,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.aurora.store.R
@@ -44,7 +43,10 @@ fun BlacklistMenu(
Box(modifier = modifier) {
IconButton(onClick = { expanded = true }) {
Icon(Icons.Default.MoreVert, contentDescription = stringResource(R.string.menu))
Icon(
painter = painterResource(R.drawable.ic_more_vert),
contentDescription = stringResource(R.string.menu)
)
}
DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
DropdownMenuItem(

View File

@@ -428,7 +428,7 @@ private fun ScreenContentAppMainPane(
HeaderComposable(
title = stringResource(R.string.details_permission),
subtitle = if (app.permissions.isNotEmpty()) {
stringResource(R.string.permissions, app.permissions.size)
stringResource(R.string.permissions_requested, app.permissions.size)
} else {
stringResource(R.string.details_no_permission)
},

View File

@@ -12,8 +12,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Done
import androidx.compose.material3.FilterChip
import androidx.compose.material3.Icon
import androidx.compose.material3.Scaffold
@@ -27,6 +25,7 @@ import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.hilt.navigation.compose.hiltViewModel
@@ -154,7 +153,7 @@ private fun FilterHeader(onClick: (filter: Review.Filter) -> Unit) {
leadingIcon = {
if (selected) {
Icon(
imageVector = Icons.Filled.Done,
painter = painterResource(R.drawable.ic_check),
contentDescription = stringResource(filters.getValue(filter))
)
}

View File

@@ -1,28 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
~ SPDX-FileCopyrightText: Material Design Authors / Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M10,15.172l9.192,-9.193 1.415,1.414L10,18l-6.364,-6.364 1.414,-1.414z" />
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M382,720L154,492L211,435L382,606L749,239L806,296L382,720Z"/>
</vector>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: Material Design Authors / Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M480,800Q447,800 423.5,776.5Q400,753 400,720Q400,687 423.5,663.5Q447,640 480,640Q513,640 536.5,663.5Q560,687 560,720Q560,753 536.5,776.5Q513,800 480,800ZM480,560Q447,560 423.5,536.5Q400,513 400,480Q400,447 423.5,423.5Q447,400 480,400Q513,400 536.5,423.5Q560,447 560,480Q560,513 536.5,536.5Q513,560 480,560ZM480,320Q447,320 423.5,296.5Q400,273 400,240Q400,207 423.5,183.5Q447,160 480,160Q513,160 536.5,183.5Q560,207 560,240Q560,273 536.5,296.5Q513,320 480,320Z"/>
</vector>

View File

@@ -8,6 +8,7 @@ androidx-junit = "1.3.0"
browser = "1.9.0"
coil = "3.3.0"
composeBom = "2025.07.00"
composeMaterial = "1.4.0-alpha16"
core = "1.16.0"
epoxy = "5.1.4"
espresso = "3.7.0"
@@ -56,7 +57,7 @@ androidx-hilt-navigation = { module = "androidx.hilt:hilt-navigation-compose", v
androidx-junit = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-junit" }
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "composeMaterial" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" }
androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" }
androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" }