diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 506f1fd..d482737 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -16,14 +16,14 @@ apply(from = "../secret.gradle.kts") android { namespace = "com.skyd.rays" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.skyd.rays" minSdk = 24 - targetSdk = 34 + targetSdk = 35 versionCode = 67 - versionName = "2.3-alpha05" + versionName = "2.3-alpha06" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { @@ -121,6 +121,10 @@ android { useLegacyPackaging = true } } + androidResources { + @Suppress("UnstableApiUsage") + generateLocaleConfig = true + } } tasks.withType(KotlinCompile::class.java).configureEach { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7fca745..6fe92bb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,7 +16,6 @@ android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:localeConfig="@xml/locales_config" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" diff --git a/app/src/main/java/com/skyd/rays/model/respository/SelfieSegmentationRepository.kt b/app/src/main/java/com/skyd/rays/model/respository/SelfieSegmentationRepository.kt index 71a578e..627ac1e 100644 --- a/app/src/main/java/com/skyd/rays/model/respository/SelfieSegmentationRepository.kt +++ b/app/src/main/java/com/skyd/rays/model/respository/SelfieSegmentationRepository.kt @@ -45,7 +45,7 @@ class SelfieSegmentationRepository @Inject constructor() : BaseRepository() { val underlayBitmap = if (backgroundUri != null) { appContext.contentResolver.openInputStream(backgroundUri)!!.use { val origin = BitmapFactory.decodeStream(it) - origin.copy(origin.config, true).apply { + origin.copy(origin.config!!, true).apply { setHasAlpha(true) origin.recycle() } @@ -104,7 +104,7 @@ class SelfieSegmentationRepository @Inject constructor() : BaseRepository() { val foregroundBitmap = appContext.contentResolver.openInputStream(foregroundUri)!!.use { val origin = BitmapFactory.decodeStream(it) - origin.copy(origin.config, true).apply { + origin.copy(origin.config!!, true).apply { setHasAlpha(true) origin.recycle() } diff --git a/app/src/main/java/com/skyd/rays/ui/activity/CrashActivity.kt b/app/src/main/java/com/skyd/rays/ui/activity/CrashActivity.kt index 53bb333..203bbd8 100644 --- a/app/src/main/java/com/skyd/rays/ui/activity/CrashActivity.kt +++ b/app/src/main/java/com/skyd/rays/ui/activity/CrashActivity.kt @@ -20,7 +20,7 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.BugReport +import androidx.compose.material.icons.outlined.BugReport import androidx.compose.material3.Button import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -122,7 +122,7 @@ private fun CrashScreen( Spacer(modifier = Modifier.height(40.dp)) Icon( modifier = Modifier.size(40.dp), - imageVector = Icons.Default.BugReport, + imageVector = Icons.Outlined.BugReport, contentDescription = null, ) diff --git a/app/src/main/java/com/skyd/rays/ui/component/RaysSwipeToDismiss.kt b/app/src/main/java/com/skyd/rays/ui/component/RaysSwipeToDismiss.kt index 24dd916..6b2d601 100644 --- a/app/src/main/java/com/skyd/rays/ui/component/RaysSwipeToDismiss.kt +++ b/app/src/main/java/com/skyd/rays/ui/component/RaysSwipeToDismiss.kt @@ -6,7 +6,7 @@ import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Delete +import androidx.compose.material.icons.outlined.Delete import androidx.compose.material3.Icon import androidx.compose.material3.SwipeToDismissBox import androidx.compose.material3.SwipeToDismissBoxState @@ -31,7 +31,7 @@ fun RaysSwipeToDismiss( contentAlignment = Alignment.CenterEnd ) { Icon( - imageVector = Icons.Default.Delete, + imageVector = Icons.Outlined.Delete, contentDescription = stringResource(R.string.delete), tint = Color.White ) diff --git a/app/src/main/java/com/skyd/rays/ui/component/dialog/ExportDialog.kt b/app/src/main/java/com/skyd/rays/ui/component/dialog/ExportDialog.kt index 937ccf3..a88e9b8 100644 --- a/app/src/main/java/com/skyd/rays/ui/component/dialog/ExportDialog.kt +++ b/app/src/main/java/com/skyd/rays/ui/component/dialog/ExportDialog.kt @@ -6,7 +6,7 @@ import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.layout.Row import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Folder +import androidx.compose.material.icons.outlined.Folder import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -61,7 +61,7 @@ fun ExportDialog( onClick = { pickExportDirLauncher.safeLaunch(Uri.parse(exportStickerDir)) }, - imageVector = Icons.Default.Folder, + imageVector = Icons.Outlined.Folder, contentDescription = stringResource(R.string.home_screen_select_export_folder) ) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/about/AboutScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/about/AboutScreen.kt index 08984b8..e2da9bf 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/about/AboutScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/about/AboutScreen.kt @@ -24,11 +24,11 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Balance -import androidx.compose.material.icons.filled.Coffee -import androidx.compose.material.icons.filled.Lightbulb -import androidx.compose.material.icons.filled.Translate -import androidx.compose.material.icons.filled.Update +import androidx.compose.material.icons.outlined.Balance +import androidx.compose.material.icons.outlined.Coffee +import androidx.compose.material.icons.outlined.Lightbulb +import androidx.compose.material.icons.outlined.Translate +import androidx.compose.material.icons.outlined.Update import androidx.compose.material3.Badge import androidx.compose.material3.BadgedBox import androidx.compose.material3.Button @@ -112,13 +112,13 @@ fun AboutScreen() { title = { Text(text = stringResource(R.string.about)) }, actions = { RaysIconButton( - imageVector = Icons.Default.Balance, + imageVector = Icons.Outlined.Balance, contentDescription = stringResource(id = R.string.license_screen_name), onClick = { navController.navigate(LICENSE_SCREEN_ROUTE) } ) RaysIconButton( onClick = { openUpdateDialog = true }, - imageVector = Icons.Default.Update, + imageVector = Icons.Outlined.Update, contentDescription = stringResource(id = R.string.update_check) ) }, @@ -308,7 +308,7 @@ private fun HelpArea( .weight(1f) .fillMaxHeight() ) { - Icon(imageVector = Icons.Default.Translate, contentDescription = null) + Icon(imageVector = Icons.Outlined.Translate, contentDescription = null) Spacer(modifier = Modifier.width(6.dp)) Text(text = stringResource(id = R.string.help_translate), textAlign = TextAlign.Center) } @@ -319,7 +319,7 @@ private fun HelpArea( .weight(1f) .fillMaxHeight() ) { - Icon(imageVector = Icons.Default.Coffee, contentDescription = null) + Icon(imageVector = Icons.Outlined.Coffee, contentDescription = null) Spacer(modifier = Modifier.width(6.dp)) Text(text = stringResource(id = R.string.sponsor), textAlign = TextAlign.Center) } @@ -332,7 +332,7 @@ private fun SponsorDialog(visible: Boolean, onClose: () -> Unit) { RaysDialog( visible = visible, onDismissRequest = onClose, - icon = { Icon(imageVector = Icons.Default.Coffee, contentDescription = null) }, + icon = { Icon(imageVector = Icons.Outlined.Coffee, contentDescription = null) }, title = { Text(text = stringResource(id = R.string.sponsor)) }, selectable = false, text = { @@ -346,7 +346,7 @@ private fun SponsorDialog(visible: Boolean, onClose: () -> Unit) { }, headlineContent = { Text(text = stringResource(R.string.sponsor_afadian)) }, leadingContent = { - Icon(imageVector = Icons.Default.Lightbulb, contentDescription = null) + Icon(imageVector = Icons.Outlined.Lightbulb, contentDescription = null) }, colors = ListItemDefaults.colors(containerColor = Color.Transparent), ) @@ -358,7 +358,7 @@ private fun SponsorDialog(visible: Boolean, onClose: () -> Unit) { }, headlineContent = { Text(text = stringResource(R.string.sponsor_buy_me_a_coffee)) }, leadingContent = { - Icon(imageVector = Icons.Default.Coffee, contentDescription = null) + Icon(imageVector = Icons.Outlined.Coffee, contentDescription = null) }, colors = ListItemDefaults.colors(containerColor = Color.Transparent), ) diff --git a/app/src/main/java/com/skyd/rays/ui/screen/add/AddScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/add/AddScreen.kt index c3d0667..f42df04 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/add/AddScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/add/AddScreen.kt @@ -36,18 +36,18 @@ import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Help -import androidx.compose.material.icons.filled.AddBox -import androidx.compose.material.icons.filled.AddPhotoAlternate -import androidx.compose.material.icons.filled.AddToPhotos -import androidx.compose.material.icons.filled.Autorenew -import androidx.compose.material.icons.filled.Cancel -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.EditOff -import androidx.compose.material.icons.filled.ExpandLess -import androidx.compose.material.icons.filled.ExpandMore -import androidx.compose.material.icons.filled.HighlightOff -import androidx.compose.material.icons.filled.Save +import androidx.compose.material.icons.automirrored.outlined.Help +import androidx.compose.material.icons.outlined.AddBox +import androidx.compose.material.icons.outlined.AddPhotoAlternate +import androidx.compose.material.icons.outlined.AddToPhotos +import androidx.compose.material.icons.outlined.Autorenew +import androidx.compose.material.icons.outlined.Cancel +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.EditOff +import androidx.compose.material.icons.outlined.ExpandLess +import androidx.compose.material.icons.outlined.ExpandMore +import androidx.compose.material.icons.outlined.HighlightOff +import androidx.compose.material.icons.outlined.Save import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.Card import androidx.compose.material3.DropdownMenu @@ -209,7 +209,7 @@ fun AddScreen( processNext() }, contentDescription = stringResource(R.string.add_screen_skip_current_sticker), - imageVector = Icons.Default.EditOff, + imageVector = Icons.Outlined.EditOff, ) RaysIconButton( onClick = { @@ -254,12 +254,12 @@ fun AddScreen( }, enabled = saveButtonEnable && !uiState.loadingDialog, contentDescription = stringResource(R.string.add_screen_save_current_sticker), - imageVector = Icons.Default.Save, + imageVector = Icons.Outlined.Save, ) // RaysIconButton( // onClick = { openMoreMenu = true }, // contentDescription = stringResource(R.string.more), -// imageVector = Icons.Default.MoreVert, +// imageVector = Icons.Outlined.MoreVert, // ) // MoreMenu( // expanded = openMoreMenu, @@ -429,7 +429,7 @@ private fun LazyListScope.titleInputFieldItem( if (value.isNotEmpty()) { RaysIconButton( onClick = { onValueChange("") }, - imageVector = Icons.Default.Cancel, + imageVector = Icons.Outlined.Cancel, contentDescription = stringResource(R.string.cancel), ) } @@ -473,17 +473,17 @@ private fun LazyListScope.tagsInputFieldItem( onAddClick() onValueChange("") }, - imageVector = Icons.Default.AddBox, + imageVector = Icons.Outlined.AddBox, contentDescription = stringResource(R.string.add_screen_add_tag), ) RaysIconButton( onClick = onAddToAllClick, - imageVector = Icons.Default.AddToPhotos, + imageVector = Icons.Outlined.AddToPhotos, contentDescription = stringResource(R.string.add_screen_add_tag_to_all), ) RaysIconButton( onClick = { onValueChange("") }, - imageVector = Icons.Default.Cancel, + imageVector = Icons.Outlined.Cancel, contentDescription = stringResource(R.string.clear_input_text), ) } @@ -539,14 +539,14 @@ private fun AddToAllList(list: List, onDeleteTag: (String) -> Unit) { ) { RaysIconButton( onClick = { scope.launch { tooltipState.show(MutatePriority.PreventUserInput) } }, - imageVector = Icons.AutoMirrored.Default.Help, + imageVector = Icons.AutoMirrored.Outlined.Help, ) } Spacer(modifier = Modifier.weight(1f)) RaysIconButton( onClick = { expandFlowRow = !expandFlowRow }, - imageVector = if (expandFlowRow) Icons.Default.ExpandLess - else Icons.Default.ExpandMore, + imageVector = if (expandFlowRow) Icons.Outlined.ExpandLess + else Icons.Outlined.ExpandMore, interactionSource = interactionSource, ) } @@ -569,7 +569,7 @@ private fun AddToAllList(list: List, onDeleteTag: (String) -> Unit) { trailingIcon = { Icon( modifier = Modifier.size(AssistChipDefaults.IconSize), - imageVector = Icons.Default.Close, + imageVector = Icons.Outlined.Close, contentDescription = null ) } @@ -608,7 +608,7 @@ private fun WaitingRow( if (!isEdit) { RaysIconButton( onClick = onSelectStickersClick, - imageVector = Icons.Default.AddPhotoAlternate, + imageVector = Icons.Outlined.AddPhotoAlternate, contentDescription = stringResource(R.string.add_screen_add_stickers), ) } @@ -650,7 +650,7 @@ private fun WaitingRow( modifier = iconButtonModifier, colors = iconButtonColors, onClick = { onRemoveStickerFromWaitingListClick(index) }, - imageVector = Icons.Default.HighlightOff, + imageVector = Icons.Outlined.HighlightOff, contentDescription = stringResource(R.string.add_screen_remove_sticker_from_waiting_list), ) Spacer(modifier = Modifier.width(3.dp)) @@ -658,7 +658,7 @@ private fun WaitingRow( modifier = iconButtonModifier, colors = iconButtonColors, onClick = { onReplaceStickerClick(index) }, - imageVector = Icons.Default.Autorenew, + imageVector = Icons.Outlined.Autorenew, contentDescription = stringResource(R.string.add_screen_update_sticker), ) } @@ -688,7 +688,7 @@ private fun AddedTags(tags: List, onClick: (Int) -> Unit) { trailingIcon = { Icon( modifier = Modifier.size(AssistChipDefaults.IconSize), - imageVector = Icons.Default.Close, + imageVector = Icons.Outlined.Close, contentDescription = null ) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailMenu.kt b/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailMenu.kt index 1e1ca83..298895f 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailMenu.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailMenu.kt @@ -1,11 +1,11 @@ package com.skyd.rays.ui.screen.detail import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.Help -import androidx.compose.material.icons.filled.AspectRatio -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.Save +import androidx.compose.material.icons.automirrored.outlined.Help +import androidx.compose.material.icons.outlined.AspectRatio +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.Info +import androidx.compose.material.icons.outlined.Save import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.HorizontalDivider @@ -40,11 +40,11 @@ fun DetailMenu( onDismissRequest() onStickerScaleClick() }, - leadingIcon = { Icon(Icons.Default.AspectRatio, contentDescription = null) }, + leadingIcon = { Icon(Icons.Outlined.AspectRatio, contentDescription = null) }, trailingIcon = { RaysIconButton( onClick = { openBrowser(IMAGE_CONTENT_SCALE_HELP_URL) }, - imageVector = Icons.AutoMirrored.Default.Help, + imageVector = Icons.AutoMirrored.Outlined.Help, ) } ) @@ -56,7 +56,7 @@ fun DetailMenu( onDismissRequest() onDeleteClick() }, - leadingIcon = { Icon(Icons.Default.Delete, contentDescription = null) } + leadingIcon = { Icon(Icons.Outlined.Delete, contentDescription = null) } ) DropdownMenuItem( enabled = stickerMenuItemEnabled, @@ -65,7 +65,7 @@ fun DetailMenu( onDismissRequest() onExportClick() }, - leadingIcon = { Icon(Icons.Default.Save, contentDescription = null) } + leadingIcon = { Icon(Icons.Outlined.Save, contentDescription = null) } ) DropdownMenuItem( enabled = stickerMenuItemEnabled, @@ -74,7 +74,7 @@ fun DetailMenu( onDismissRequest() onStickerInfoClick() }, - leadingIcon = { Icon(Icons.Default.Info, contentDescription = null) } + leadingIcon = { Icon(Icons.Outlined.Info, contentDescription = null) } ) } } \ No newline at end of file diff --git a/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailScreen.kt index f27ab82..43b71f6 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/detail/DetailScreen.kt @@ -28,14 +28,14 @@ import androidx.compose.foundation.selection.selectableGroup import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.AddCircle -import androidx.compose.material.icons.filled.AdsClick -import androidx.compose.material.icons.filled.Badge -import androidx.compose.material.icons.filled.ContentCopy -import androidx.compose.material.icons.filled.Edit -import androidx.compose.material.icons.filled.Image -import androidx.compose.material.icons.filled.MoreVert -import androidx.compose.material.icons.filled.Share +import androidx.compose.material.icons.outlined.AddCircle +import androidx.compose.material.icons.outlined.AdsClick +import androidx.compose.material.icons.outlined.Badge +import androidx.compose.material.icons.outlined.ContentCopy +import androidx.compose.material.icons.outlined.Edit +import androidx.compose.material.icons.outlined.Image +import androidx.compose.material.icons.outlined.MoreVert +import androidx.compose.material.icons.outlined.Share import androidx.compose.material3.AssistChip import androidx.compose.material3.Card import androidx.compose.material3.Icon @@ -169,7 +169,7 @@ fun DetailScreen(stickerUuid: String, viewModel: DetailViewModel = hiltViewModel }, actions = { RaysIconButton( - imageVector = Icons.Default.Share, + imageVector = Icons.Outlined.Share, contentDescription = stringResource(R.string.send_sticker), enabled = uiState.stickerDetailState is StickerDetailState.Success, onClick = { @@ -185,7 +185,7 @@ fun DetailScreen(stickerUuid: String, viewModel: DetailViewModel = hiltViewModel }, ) RaysIconButton( - imageVector = Icons.Default.ContentCopy, + imageVector = Icons.Outlined.ContentCopy, contentDescription = stringResource(id = R.string.detail_screen_copy), enabled = uiState.stickerDetailState is StickerDetailState.Success, onClick = { @@ -201,7 +201,7 @@ fun DetailScreen(stickerUuid: String, viewModel: DetailViewModel = hiltViewModel RaysIconButton( onClick = { openMenu = true }, enabled = uiState.stickerDetailState is StickerDetailState.Success, - imageVector = Icons.Default.MoreVert, + imageVector = Icons.Outlined.MoreVert, contentDescription = stringResource(id = R.string.more) ) DetailMenu( @@ -422,32 +422,32 @@ fun StickerDetailInfo(modifier: Modifier = Modifier, stickerWithTags: StickerWit val sticker = stickerWithTags.sticker Column(modifier = modifier) { DetailInfoItem( - icon = Icons.Default.Badge, + icon = Icons.Outlined.Badge, title = stringResource(id = R.string.detail_screen_sticker_info_uuid), text = sticker.uuid, ) DetailInfoItem( - icon = Icons.Default.Image, + icon = Icons.Outlined.Image, title = stringResource(id = R.string.detail_screen_sticker_info_md5), text = sticker.stickerMd5, ) DetailInfoItem( - icon = Icons.Default.AdsClick, + icon = Icons.Outlined.AdsClick, title = stringResource(id = R.string.sticker_click_count), text = sticker.clickCount.toString(), ) DetailInfoItem( - icon = Icons.Default.Share, + icon = Icons.Outlined.Share, title = stringResource(id = R.string.sticker_share_count), text = sticker.shareCount.toString() ) DetailInfoItem( - icon = Icons.Default.AddCircle, + icon = Icons.Outlined.AddCircle, title = stringResource(id = R.string.sticker_create_time), text = sticker.createTime.toDateTimeString() ) DetailInfoItem( - icon = Icons.Default.Edit, + icon = Icons.Outlined.Edit, title = stringResource(id = R.string.detail_screen_sticker_info_last_modified_time), text = (sticker.modifyTime ?: sticker.createTime).toDateTimeString() ) @@ -487,7 +487,7 @@ fun DetailScreenFloatingActionButton( val content: @Composable () -> Unit = remember { @Composable { - Icon(imageVector = Icons.Default.Edit, contentDescription = null) + Icon(imageVector = Icons.Outlined.Edit, contentDescription = null) } } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/home/HomeScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/home/HomeScreen.kt index c3de948..7fd08d6 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/home/HomeScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/home/HomeScreen.kt @@ -25,9 +25,9 @@ import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.outlined.Reply import androidx.compose.material.icons.automirrored.outlined.ScheduleSend -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.Search +import androidx.compose.material.icons.outlined.Add import androidx.compose.material.icons.outlined.MoreTime +import androidx.compose.material.icons.outlined.Search import androidx.compose.material.icons.outlined.Shuffle import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ElevatedCard @@ -115,7 +115,7 @@ fun HomeScreen(viewModel: HomeViewModel = hiltViewModel()) { onClick = { navController.navigate(SEARCH_SCREEN_ROUTE) } ) { Icon( - imageVector = Icons.Default.Search, + imageVector = Icons.Outlined.Search, tint = MaterialTheme.colorScheme.onSurface, contentDescription = null ) @@ -446,7 +446,7 @@ private fun HomeScreenFloatingActionButton( val content: @Composable () -> Unit = remember { @Composable { - Icon(imageVector = Icons.Default.Add, contentDescription = null) + Icon(imageVector = Icons.Outlined.Add, contentDescription = null) } } val onClick = remember { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/minitool/MiniToolScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/minitool/MiniToolScreen.kt index 7a7250e..e2dd6ea 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/minitool/MiniToolScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/minitool/MiniToolScreen.kt @@ -3,9 +3,9 @@ package com.skyd.rays.ui.screen.minitool import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Extension -import androidx.compose.material.icons.filled.PeopleAlt -import androidx.compose.material.icons.filled.Style +import androidx.compose.material.icons.outlined.Extension +import androidx.compose.material.icons.outlined.PeopleAlt +import androidx.compose.material.icons.outlined.Style import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -50,7 +50,7 @@ fun MiniToolScreen() { title = { Text(text = stringResource(id = R.string.mini_tool_screen_name)) }, navigationIcon = { RaysIconButton( - imageVector = Icons.Default.Extension, + imageVector = Icons.Outlined.Extension, onClick = { snackbarHostState.showSnackbar( message = "\ud83c\udfee Happy New Year 2024~", @@ -66,12 +66,12 @@ fun MiniToolScreen() { val miniToolList = listOf( MiniTool1Bean( title = stringResource(R.string.style_transfer_screen_name), - icon = Icons.Default.Style, + icon = Icons.Outlined.Style, action = { navController.navigate(STYLE_TRANSFER_SCREEN_ROUTE) } ), MiniTool1Bean( title = stringResource(R.string.selfie_segmentation_screen_name), - icon = Icons.Default.PeopleAlt, + icon = Icons.Outlined.PeopleAlt, action = { navController.navigate(SELFIE_SEGMENTATION_SCREEN_ROUTE) } ), ) diff --git a/app/src/main/java/com/skyd/rays/ui/screen/minitool/selfiesegmentation/SelfieSegmentationScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/minitool/selfiesegmentation/SelfieSegmentationScreen.kt index 465d580..86885de 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/minitool/selfiesegmentation/SelfieSegmentationScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/minitool/selfiesegmentation/SelfieSegmentationScreen.kt @@ -24,10 +24,10 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyItemScope import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.ContentCut -import androidx.compose.material.icons.filled.Image +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.ContentCut +import androidx.compose.material.icons.outlined.Image import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.Icon @@ -106,7 +106,7 @@ fun SelfieSegmentationScreen(viewModel: SelfieSegmentationViewModel = hiltViewMo floatingActionButton = { RaysExtendedFloatingActionButton( text = { Text(text = stringResource(R.string.selfie_segmentation_screen_segment)) }, - icon = { Icon(imageVector = Icons.Default.ContentCut, contentDescription = null) }, + icon = { Icon(imageVector = Icons.Outlined.ContentCut, contentDescription = null) }, onClick = { val foreground = selfieUri if (foreground == null) { @@ -347,7 +347,7 @@ private fun InputArea( ) Icon( modifier = Modifier.padding(10.dp), - imageVector = Icons.Default.Add, + imageVector = Icons.Outlined.Add, contentDescription = null ) InputItem( @@ -395,7 +395,7 @@ private fun InputItem( ) { Icon( modifier = Modifier.size(40.dp), - imageVector = Icons.Default.Image, + imageVector = Icons.Outlined.Image, contentDescription = null, tint = MaterialTheme.colorScheme.onPrimary, ) @@ -435,7 +435,7 @@ private fun InputItem( RaysIconButton( modifier = Modifier.align(Alignment.TopEnd), onClick = onRemoveClick, - imageVector = Icons.Default.Close, + imageVector = Icons.Outlined.Close, style = RaysIconButtonStyle.Filled, ) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/minitool/styletransfer/StyleTransferScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/minitool/styletransfer/StyleTransferScreen.kt index 7db6e91..d2fadc4 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/minitool/styletransfer/StyleTransferScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/minitool/styletransfer/StyleTransferScreen.kt @@ -19,9 +19,9 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyItemScope import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.Image -import androidx.compose.material.icons.filled.Transform +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Image +import androidx.compose.material.icons.outlined.Transform import androidx.compose.material3.Card import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -89,7 +89,7 @@ fun StyleTransferScreen(viewModel: StyleTransferViewModel = hiltViewModel()) { floatingActionButton = { RaysExtendedFloatingActionButton( text = { Text(text = stringResource(R.string.style_transfer_screen_transfer)) }, - icon = { Icon(imageVector = Icons.Default.Transform, contentDescription = null) }, + icon = { Icon(imageVector = Icons.Outlined.Transform, contentDescription = null) }, onClick = { val style = styleUri val content = contentUri @@ -185,7 +185,7 @@ private fun InputArea( ) Icon( modifier = Modifier.padding(10.dp), - imageVector = Icons.Default.Add, + imageVector = Icons.Outlined.Add, contentDescription = null ) InputItem( @@ -231,7 +231,7 @@ private fun InputItem( ) { Icon( modifier = Modifier.size(40.dp), - imageVector = Icons.Default.Image, + imageVector = Icons.Outlined.Image, contentDescription = null, tint = MaterialTheme.colorScheme.onPrimary, ) diff --git a/app/src/main/java/com/skyd/rays/ui/screen/more/MoreScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/more/MoreScreen.kt index dfa3b68..4841259 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/more/MoreScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/more/MoreScreen.kt @@ -4,10 +4,10 @@ import android.content.Context import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ImportExport -import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.Settings -import androidx.compose.material.icons.filled.Widgets +import androidx.compose.material.icons.outlined.ImportExport +import androidx.compose.material.icons.outlined.Info +import androidx.compose.material.icons.outlined.Settings +import androidx.compose.material.icons.outlined.Widgets import androidx.compose.material3.ColorScheme import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold @@ -64,7 +64,7 @@ fun MoreScreen() { title = { Text(text = stringResource(id = R.string.more_screen_name)) }, navigationIcon = { RaysIconButton( - imageVector = Icons.Default.Widgets, + imageVector = Icons.Outlined.Widgets, onClick = { snackbarHostState.showSnackbar( message = "\uD83C\uDFEE Happy New Year 2024~", @@ -109,7 +109,7 @@ private fun getMoreList( return listOf( More1Bean( title = context.getString(R.string.import_export_screen_name), - icon = Icons.Default.ImportExport, + icon = Icons.Outlined.ImportExport, iconTint = colorScheme.onPrimary, shape = SquircleShape, shapeColor = colorScheme.primary, @@ -117,7 +117,7 @@ private fun getMoreList( ), More1Bean( title = context.getString(R.string.settings), - icon = Icons.Default.Settings, + icon = Icons.Outlined.Settings, iconTint = colorScheme.onSecondary, shape = CloverShape, shapeColor = colorScheme.secondary, @@ -125,7 +125,7 @@ private fun getMoreList( ), More1Bean( title = context.getString(R.string.about), - icon = Icons.Default.Info, + icon = Icons.Outlined.Info, iconTint = colorScheme.onTertiary, shape = CurlyCornerShape(amp = with(density) { 2.dp.toPx() }, count = 10), shapeColor = colorScheme.tertiary, diff --git a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchMenu.kt b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchMenu.kt index f4eabce..deb0cb3 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchMenu.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchMenu.kt @@ -1,7 +1,7 @@ package com.skyd.rays.ui.screen.search import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Done +import androidx.compose.material.icons.outlined.Done import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.Icon @@ -32,7 +32,7 @@ internal fun SearchResultSortMenu( leadingIcon = { if (searchResultSort == it) { Icon( - imageVector = Icons.Default.Done, + imageVector = Icons.Outlined.Done, contentDescription = null ) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchResultList.kt b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchResultList.kt index 370f4f4..3b9cb6b 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchResultList.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchResultList.kt @@ -30,14 +30,14 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowDropDown -import androidx.compose.material.icons.filled.ArrowDropUp -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.Edit -import androidx.compose.material.icons.filled.FolderZip -import androidx.compose.material.icons.filled.Save -import androidx.compose.material.icons.filled.Share +import androidx.compose.material.icons.outlined.ArrowDropDown +import androidx.compose.material.icons.outlined.ArrowDropUp import androidx.compose.material.icons.outlined.CheckCircle +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.Edit +import androidx.compose.material.icons.outlined.FolderZip +import androidx.compose.material.icons.outlined.Save +import androidx.compose.material.icons.outlined.Share import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.Badge import androidx.compose.material3.FilterChip @@ -171,8 +171,8 @@ fun SearchResultConfigBar( label = { Text(text = stringResource(R.string.search_result_sort)) }, trailingIcon = { Icon( - imageVector = if (expandMenu) Icons.Default.ArrowDropUp - else Icons.Default.ArrowDropDown, + imageVector = if (expandMenu) Icons.Outlined.ArrowDropUp + else Icons.Outlined.ArrowDropDown, contentDescription = null, modifier = Modifier.size(AssistChipDefaults.IconSize), ) @@ -248,7 +248,7 @@ internal fun MultiSelectActionBar( ) }, enabled = selectedStickers.isNotEmpty(), - imageVector = Icons.Default.Share, + imageVector = Icons.Outlined.Share, contentDescription = stringResource(id = R.string.send_sticker) ) }, @@ -256,7 +256,7 @@ internal fun MultiSelectActionBar( RaysIconButton( onClick = onEditClick, enabled = selectedStickers.isNotEmpty(), - imageVector = Icons.Default.Edit, + imageVector = Icons.Outlined.Edit, contentDescription = stringResource(id = R.string.add_screen_name_edit) ) }, @@ -264,7 +264,7 @@ internal fun MultiSelectActionBar( RaysIconButton( onClick = onExportClick, enabled = selectedStickers.isNotEmpty(), - imageVector = Icons.Default.Save, + imageVector = Icons.Outlined.Save, contentDescription = stringResource(id = R.string.home_screen_export) ) }, @@ -272,7 +272,7 @@ internal fun MultiSelectActionBar( RaysIconButton( onClick = onExportAsZipClick, enabled = selectedStickers.isNotEmpty(), - imageVector = Icons.Default.FolderZip, + imageVector = Icons.Outlined.FolderZip, contentDescription = stringResource(id = R.string.home_screen_export_to_backup_zip) ) }, @@ -280,7 +280,7 @@ internal fun MultiSelectActionBar( RaysIconButton( onClick = onDeleteClick, enabled = selectedStickers.isNotEmpty(), - imageVector = Icons.Default.Delete, + imageVector = Icons.Outlined.Delete, contentDescription = stringResource(id = R.string.home_screen_delete) ) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchScreen.kt index b50cfd9..857b84e 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/search/SearchScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/search/SearchScreen.kt @@ -34,10 +34,10 @@ import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowUpward -import androidx.compose.material.icons.filled.Clear -import androidx.compose.material.icons.filled.ExpandLess -import androidx.compose.material.icons.filled.ExpandMore +import androidx.compose.material.icons.outlined.ArrowUpward +import androidx.compose.material.icons.outlined.Clear +import androidx.compose.material.icons.outlined.ExpandLess +import androidx.compose.material.icons.outlined.ExpandMore import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -148,7 +148,7 @@ fun SearchScreen(viewModel: SearchViewModel = hiltViewModel()) { contentDescription = stringResource(R.string.home_screen_search_result_list_to_top), ) { Icon( - imageVector = Icons.Default.ArrowUpward, + imageVector = Icons.Outlined.ArrowUpward, contentDescription = null ) } @@ -347,7 +347,7 @@ fun TrailingIcon( ) { if (showClearButton) { RaysIconButton( - imageVector = Icons.Default.Clear, + imageVector = Icons.Outlined.Clear, contentDescription = stringResource(R.string.home_screen_clear_search_text), onClick = { onClick?.invoke() } ) @@ -424,7 +424,7 @@ fun PopularTagsBar( } RaysIconButton( - imageVector = if (expand) Icons.Default.ExpandLess else Icons.Default.ExpandMore, + imageVector = if (expand) Icons.Outlined.ExpandLess else Icons.Outlined.ExpandMore, contentDescription = if (expand) stringResource(R.string.collapse) else stringResource(R.string.expand), onClick = { expand = !expand }, diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/SettingsScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/SettingsScreen.kt index cbbfbc6..5a70ed0 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/SettingsScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/SettingsScreen.kt @@ -3,13 +3,13 @@ package com.skyd.rays.ui.screen.settings import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ManageSearch -import androidx.compose.material.icons.filled.AdminPanelSettings -import androidx.compose.material.icons.filled.Api -import androidx.compose.material.icons.filled.Dataset -import androidx.compose.material.icons.filled.Palette -import androidx.compose.material.icons.filled.Share -import androidx.compose.material.icons.filled.SmartToy +import androidx.compose.material.icons.automirrored.outlined.ManageSearch +import androidx.compose.material.icons.outlined.AdminPanelSettings +import androidx.compose.material.icons.outlined.Api +import androidx.compose.material.icons.outlined.Dataset +import androidx.compose.material.icons.outlined.Palette +import androidx.compose.material.icons.outlined.Share +import androidx.compose.material.icons.outlined.SmartToy import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -54,7 +54,7 @@ fun SettingsScreen() { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Palette), + painter = rememberVectorPainter(Icons.Outlined.Palette), text = stringResource(id = R.string.appearance_screen_name), descriptionText = stringResource(id = R.string.setting_screen_appearance_description), onClick = { navController.navigate(APPEARANCE_SCREEN_ROUTE) } @@ -62,7 +62,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.AutoMirrored.Default.ManageSearch), + painter = rememberVectorPainter(Icons.AutoMirrored.Outlined.ManageSearch), text = stringResource(id = R.string.search_config_screen_name), descriptionText = stringResource(id = R.string.setting_screen_search_description), onClick = { navController.navigate(SEARCH_CONFIG_SCREEN_ROUTE) } @@ -70,7 +70,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Share), + painter = rememberVectorPainter(Icons.Outlined.Share), text = stringResource(id = R.string.share_config_screen_name), descriptionText = stringResource(id = R.string.setting_screen_share_config_description), onClick = { navController.navigate(SHARE_CONFIG_SCREEN_ROUTE) } @@ -78,7 +78,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Dataset), + painter = rememberVectorPainter(Icons.Outlined.Dataset), text = stringResource(id = R.string.data_screen_name), descriptionText = stringResource(id = R.string.setting_screen_data_description), onClick = { navController.navigate(DATA_SCREEN_ROUTE) } @@ -86,7 +86,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.SmartToy), + painter = rememberVectorPainter(Icons.Outlined.SmartToy), text = stringResource(id = R.string.ml_screen_name), descriptionText = stringResource(id = R.string.setting_screen_ml_description), onClick = { navController.navigate(ML_SCREEN_ROUTE) } @@ -94,7 +94,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.AdminPanelSettings), + painter = rememberVectorPainter(Icons.Outlined.AdminPanelSettings), text = stringResource(id = R.string.privacy_screen_name), descriptionText = stringResource(id = R.string.setting_screen_privacy_description), onClick = { navController.navigate(PRIVACY_SCREEN_ROUTE) } @@ -102,7 +102,7 @@ fun SettingsScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Api), + painter = rememberVectorPainter(Icons.Outlined.Api), text = stringResource(id = R.string.api_screen_name), descriptionText = stringResource(id = R.string.setting_screen_api_description), onClick = { navController.navigate(API_SCREEN_ROUTE) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/api/ApiScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/api/ApiScreen.kt index cc5559e..e6d882e 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/api/ApiScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/api/ApiScreen.kt @@ -3,7 +3,7 @@ package com.skyd.rays.ui.screen.settings.api import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Visibility +import androidx.compose.material.icons.outlined.Visibility import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -42,7 +42,7 @@ fun ApiScreen() { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Visibility), + painter = rememberVectorPainter(Icons.Outlined.Visibility), text = stringResource(id = R.string.api_grant_screen_name), descriptionText = stringResource(id = R.string.api_grant_screen_description), onClick = { navController.navigate(API_GRANT_SCREEN_ROUTE) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/api/apigrant/ApiGrantScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/api/apigrant/ApiGrantScreen.kt index 979f275..e8f31ec 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/api/apigrant/ApiGrantScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/api/apigrant/ApiGrantScreen.kt @@ -5,9 +5,9 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.Visibility -import androidx.compose.material.icons.filled.VisibilityOff +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Visibility +import androidx.compose.material.icons.outlined.VisibilityOff import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHostState @@ -80,7 +80,7 @@ fun ApiGrantScreen(viewModel: ApiGrantViewModel = hiltViewModel()) { actions = { RaysIconButton( onClick = { openAddDialog = true }, - imageVector = Icons.Default.Add, + imageVector = Icons.Outlined.Add, contentDescription = stringResource(R.string.uri_string_share_screen_add_app_package) ) }, @@ -97,7 +97,7 @@ fun ApiGrantScreen(viewModel: ApiGrantViewModel = hiltViewModel()) { item { BannerItem { SwitchSettingsItem( - imageVector = if (apiGrant) Icons.Default.Visibility else Icons.Default.VisibilityOff, + imageVector = if (apiGrant) Icons.Outlined.Visibility else Icons.Outlined.VisibilityOff, text = stringResource(id = R.string.api_grant_screen_enable), checked = apiGrant, onCheckedChange = { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/AppearanceScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/AppearanceScreen.kt index d238f41..d755608 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/AppearanceScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/AppearanceScreen.kt @@ -28,10 +28,10 @@ import androidx.compose.foundation.selection.selectableGroup import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.DarkMode -import androidx.compose.material.icons.filled.Palette -import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.outlined.Check +import androidx.compose.material.icons.outlined.DarkMode +import androidx.compose.material.icons.outlined.Palette +import androidx.compose.material.icons.outlined.Search import androidx.compose.material3.ColorScheme import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -146,7 +146,7 @@ fun AppearanceScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.DarkMode), + painter = rememberVectorPainter(image = Icons.Outlined.DarkMode), text = stringResource(id = R.string.appearance_screen_dark_mode), descriptionText = stringResource(id = R.string.appearance_screen_dark_mode_description), onClick = { openDarkBottomSheet = true } @@ -154,7 +154,7 @@ fun AppearanceScreen() { } item { SwitchSettingsItem( - imageVector = Icons.Default.Palette, + imageVector = Icons.Outlined.Palette, text = stringResource(R.string.appearance_screen_sticker_color_theme), description = stringResource(R.string.appearance_screen_sticker_color_theme_description), checked = LocalStickerColorTheme.current, @@ -172,7 +172,7 @@ fun AppearanceScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Search), + painter = rememberVectorPainter(image = Icons.Outlined.Search), text = stringResource(id = R.string.search_style_screen_name), descriptionText = null, onClick = { navController.navigate(SEARCH_STYLE_SCREEN_ROUTE) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchScreenPreview.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchScreenPreview.kt index 0b311d8..6f6063b 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchScreenPreview.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchScreenPreview.kt @@ -7,8 +7,9 @@ import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.lazy.staggeredgrid.rememberLazyStaggeredGridState import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material.icons.automirrored.outlined.ArrowBack import androidx.compose.material3.SearchBar +import androidx.compose.material3.SearchBarDefaults import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -51,22 +52,30 @@ private fun RaysSearchBarPreview() { ) { Box(modifier = Modifier.align(Alignment.TopCenter)) { val query = if (LocalShowLastQuery.current) "LOL" else "" + val onActiveChange: (Boolean) -> Unit = + { if (!it) navController.popBackStackWithLifecycle() } SearchBar( - windowInsets = WindowInsets(0.dp), - onQueryChange = {}, - query = query, - onSearch = { }, - active = true, - onActiveChange = { if (!it) navController.popBackStackWithLifecycle() }, - placeholder = { Text(text = stringResource(R.string.home_screen_search_hint)) }, - leadingIcon = { - RaysIconButton( - imageVector = Icons.AutoMirrored.Default.ArrowBack, - contentDescription = stringResource(id = R.string.home_screen_close_search), - onClick = { } + inputField = { + SearchBarDefaults.InputField( + query = query, + onQueryChange = { }, + onSearch = { }, + expanded = true, + onExpandedChange = onActiveChange, + placeholder = { Text(text = stringResource(R.string.home_screen_search_hint)) }, + leadingIcon = { + RaysIconButton( + imageVector = Icons.AutoMirrored.Outlined.ArrowBack, + contentDescription = stringResource(id = R.string.home_screen_close_search), + onClick = { } + ) + }, + trailingIcon = { TrailingIcon(showClearButton = query.isNotBlank()) {} }, ) }, - trailingIcon = { TrailingIcon(showClearButton = query.isNotBlank()) {} }, + expanded = true, + onExpandedChange = onActiveChange, + windowInsets = WindowInsets(0.dp), ) { AnimatedVisibility(visible = LocalShowPopularTags.current) { PopularTagsBar( diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchStyleScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchStyleScreen.kt index 79862dd..777c2d9 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchStyleScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/appearance/style/SearchStyleScreen.kt @@ -9,7 +9,8 @@ import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ManageSearch -import androidx.compose.material.icons.filled.LocalOffer +import androidx.compose.material.icons.automirrored.outlined.ManageSearch +import androidx.compose.material.icons.outlined.LocalOffer import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -68,7 +69,7 @@ fun SearchStyleScreen() { } item { SwitchSettingsItem( - imageVector = Icons.Default.LocalOffer, + imageVector = Icons.Outlined.LocalOffer, checked = LocalShowPopularTags.current, text = stringResource(R.string.home_style_screen_show_popular_tags), description = stringResource(R.string.home_style_screen_show_popular_tags_description), @@ -83,7 +84,7 @@ fun SearchStyleScreen() { } item { SwitchSettingsItem( - imageVector = Icons.AutoMirrored.Filled.ManageSearch, + imageVector = Icons.AutoMirrored.Outlined.ManageSearch, checked = LocalShowLastQuery.current, text = stringResource(R.string.home_style_screen_show_last_query), description = stringResource(R.string.home_style_screen_show_last_query_description), diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/DataScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/DataScreen.kt index ba3e615..6e51ed6 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/DataScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/DataScreen.kt @@ -3,10 +3,10 @@ package com.skyd.rays.ui.screen.settings.data import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Cached -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.ImportExport -import androidx.compose.material.icons.filled.Source +import androidx.compose.material.icons.outlined.Cached +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.ImportExport +import androidx.compose.material.icons.outlined.Source import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -70,7 +70,7 @@ fun DataScreen(viewModel: DataViewModel = hiltViewModel()) { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Source), + painter = rememberVectorPainter(Icons.Outlined.Source), text = stringResource(id = R.string.image_source_screen_name), descriptionText = stringResource(id = R.string.setting_screen_image_source_description), onClick = { navController.navigate(IMAGE_SOURCE_SCREEN_ROUTE) } @@ -78,7 +78,7 @@ fun DataScreen(viewModel: DataViewModel = hiltViewModel()) { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.ImportExport), + painter = rememberVectorPainter(image = Icons.Outlined.ImportExport), text = stringResource(id = R.string.import_export_screen_name), descriptionText = stringResource(id = R.string.data_screen_import_export_description), onClick = { navController.navigate(IMPORT_EXPORT_SCREEN_ROUTE) } @@ -86,7 +86,7 @@ fun DataScreen(viewModel: DataViewModel = hiltViewModel()) { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Cached), + painter = rememberVectorPainter(image = Icons.Outlined.Cached), text = stringResource(id = R.string.cache_screen_name), descriptionText = stringResource(id = R.string.cache_screen_description), onClick = { navController.navigate(CACHE_SCREEN_ROUTE) } @@ -97,7 +97,7 @@ fun DataScreen(viewModel: DataViewModel = hiltViewModel()) { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Delete), + painter = rememberVectorPainter(image = Icons.Outlined.Delete), text = stringResource(id = R.string.data_screen_delete_all), descriptionText = stringResource(id = R.string.data_screen_delete_all_description), onClick = { openDeleteAllStickersDialog = true } @@ -105,7 +105,7 @@ fun DataScreen(viewModel: DataViewModel = hiltViewModel()) { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Delete), + painter = rememberVectorPainter(image = Icons.Outlined.Delete), text = stringResource(id = R.string.data_screen_delete_all_sticker_share_time_data), descriptionText = stringResource(id = R.string.data_screen_delete_all_sticker_share_time_data_description), onClick = { openDeleteStickerShareTimeDialog = true } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/cache/CacheScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/cache/CacheScreen.kt index 27fcce1..1752b82 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/cache/CacheScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/cache/CacheScreen.kt @@ -3,8 +3,8 @@ package com.skyd.rays.ui.screen.settings.data.cache import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Gif -import androidx.compose.material.icons.filled.Image +import androidx.compose.material.icons.outlined.Gif +import androidx.compose.material.icons.outlined.Image import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -56,7 +56,7 @@ fun CacheScreen(viewModel: CacheViewModel = hiltViewModel()) { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Image), + painter = rememberVectorPainter(image = Icons.Outlined.Image), text = stringResource(id = R.string.cache_screen_delete_provider_thumbnails), descriptionText = stringResource(id = R.string.cache_screen_delete_provider_thumbnails_description), onClick = { dispatch(CacheIntent.DeleteDocumentsProviderThumbnails) } @@ -64,7 +64,7 @@ fun CacheScreen(viewModel: CacheViewModel = hiltViewModel()) { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Gif), + painter = rememberVectorPainter(image = Icons.Outlined.Gif), text = stringResource(id = R.string.cache_screen_delete_all_mimetypes), descriptionText = stringResource(id = R.string.cache_screen_delete_all_mimetypes_description), onClick = { dispatch(CacheIntent.DeleteAllMimetypes) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/ImportExportScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/ImportExportScreen.kt index ff5206d..34173e2 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/ImportExportScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/ImportExportScreen.kt @@ -3,9 +3,9 @@ package com.skyd.rays.ui.screen.settings.data.importexport import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.CloudSync -import androidx.compose.material.icons.filled.Download -import androidx.compose.material.icons.filled.Upload +import androidx.compose.material.icons.outlined.CloudSync +import androidx.compose.material.icons.outlined.Download +import androidx.compose.material.icons.outlined.Upload import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -53,7 +53,7 @@ fun ImportExportScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.CloudSync), + painter = rememberVectorPainter(image = Icons.Outlined.CloudSync), text = stringResource(id = R.string.webdav_screen_name), descriptionText = stringResource(id = R.string.import_export_screen_webdav_description), onClick = { navController.navigate(WEBDAV_SCREEN_ROUTE) } @@ -66,7 +66,7 @@ fun ImportExportScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Download), + painter = rememberVectorPainter(image = Icons.Outlined.Download), text = stringResource(id = R.string.import_files_screen_name), descriptionText = stringResource(id = R.string.import_files_screen_description), onClick = { navController.navigate(IMPORT_FILES_SCREEN_ROUTE) } @@ -74,7 +74,7 @@ fun ImportExportScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Upload), + painter = rememberVectorPainter(image = Icons.Outlined.Upload), text = stringResource(id = R.string.export_files_screen_name), descriptionText = stringResource(id = R.string.export_files_screen_description), onClick = { openExportFilesScreen(navController = navController) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/cloud/webdav/WebDavScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/cloud/webdav/WebDavScreen.kt index f3dd183..d021d91 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/cloud/webdav/WebDavScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/cloud/webdav/WebDavScreen.kt @@ -10,15 +10,15 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.AccountCircle -import androidx.compose.material.icons.filled.CloudDownload -import androidx.compose.material.icons.filled.CloudUpload -import androidx.compose.material.icons.filled.DeleteForever -import androidx.compose.material.icons.filled.Dns -import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.Key -import androidx.compose.material.icons.filled.Recycling -import androidx.compose.material.icons.filled.RestoreFromTrash +import androidx.compose.material.icons.outlined.AccountCircle +import androidx.compose.material.icons.outlined.CloudDownload +import androidx.compose.material.icons.outlined.CloudUpload +import androidx.compose.material.icons.outlined.DeleteForever +import androidx.compose.material.icons.outlined.Dns +import androidx.compose.material.icons.outlined.Info +import androidx.compose.material.icons.outlined.Key +import androidx.compose.material.icons.outlined.Recycling +import androidx.compose.material.icons.outlined.RestoreFromTrash import androidx.compose.material3.Button import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.ListItem @@ -101,7 +101,7 @@ fun WebDavScreen(viewModel: WebDavViewModel = hiltViewModel()) { actions = { RaysIconButton( onClick = { openWarningDialog = true }, - imageVector = Icons.Default.Info, + imageVector = Icons.Outlined.Info, contentDescription = stringResource(R.string.info) ) }, @@ -399,12 +399,12 @@ private fun RecycleBinBottomSheet( trailingContent = { Row { RaysIconButton( - imageVector = Icons.Default.RestoreFromTrash, + imageVector = Icons.Outlined.RestoreFromTrash, contentDescription = stringResource(R.string.webdav_screen_restore), onClick = { onRestore(list[it].uuid) } ) RaysIconButton( - imageVector = Icons.Default.DeleteForever, + imageVector = Icons.Outlined.DeleteForever, contentDescription = stringResource(R.string.webdav_screen_delete), onClick = { onDelete(list[it].uuid) } ) @@ -451,7 +451,7 @@ private fun LazyListScope.webDavItem( } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Dns), + painter = rememberVectorPainter(image = Icons.Outlined.Dns), text = stringResource(id = R.string.webdav_screen_server), descriptionText = server.ifBlank { stringResource(id = R.string.webdav_screen_server_description) @@ -459,7 +459,7 @@ private fun LazyListScope.webDavItem( onClick = onServerItemClick ) BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.AccountCircle), + painter = rememberVectorPainter(image = Icons.Outlined.AccountCircle), text = stringResource(id = R.string.webdav_screen_account), descriptionText = account.ifBlank { stringResource(id = R.string.webdav_screen_account_description) @@ -467,7 +467,7 @@ private fun LazyListScope.webDavItem( onClick = onAccountItemClick ) BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Key), + painter = rememberVectorPainter(image = Icons.Outlined.Key), text = stringResource(id = R.string.webdav_screen_password), descriptionText = stringResource( id = if (password.isBlank()) R.string.webdav_screen_password_description @@ -488,19 +488,19 @@ private fun LazyListScope.syncItem( } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.CloudDownload), + painter = rememberVectorPainter(image = Icons.Outlined.CloudDownload), text = stringResource(id = R.string.webdav_screen_download), descriptionText = stringResource(id = R.string.webdav_screen_download_description), onClick = onPullItemClick ) BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.CloudUpload), + painter = rememberVectorPainter(image = Icons.Outlined.CloudUpload), text = stringResource(id = R.string.webdav_screen_upload), descriptionText = stringResource(id = R.string.webdav_screen_upload_description), onClick = onPushItemClick ) BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Recycling), + painter = rememberVectorPainter(image = Icons.Outlined.Recycling), text = stringResource(id = R.string.webdav_screen_remote_recycle_bin), descriptionText = stringResource(id = R.string.webdav_screen_remote_recycle_bin_description), onClick = onRemoteRecycleBinItemClick diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/exportfiles/ExportFilesScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/exportfiles/ExportFilesScreen.kt index 11127d1..3d1d562 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/exportfiles/ExportFilesScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/exportfiles/ExportFilesScreen.kt @@ -10,9 +10,9 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Done -import androidx.compose.material.icons.filled.Folder -import androidx.compose.material.icons.filled.LayersClear +import androidx.compose.material.icons.outlined.Done +import androidx.compose.material.icons.outlined.Folder +import androidx.compose.material.icons.outlined.LayersClear import androidx.compose.material3.Icon import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost @@ -122,7 +122,7 @@ fun ExportFilesScreen( floatingActionButton = { RaysExtendedFloatingActionButton( text = { Text(text = stringResource(R.string.export_files_screen_export)) }, - icon = { Icon(imageVector = Icons.Default.Done, contentDescription = null) }, + icon = { Icon(imageVector = Icons.Outlined.Done, contentDescription = null) }, onClick = { if (exportStickers != null && exportStickers.isEmpty()) { snackbarHostState.showSnackbar( @@ -156,7 +156,7 @@ fun ExportFilesScreen( ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Folder), + painter = rememberVectorPainter(image = Icons.Outlined.Folder), text = stringResource(id = R.string.export_files_screen_select_dir), descriptionText = exportDir.toString().ifBlank { null }, onClick = { pickExportDirLauncher.safeLaunch(exportDir) } @@ -164,7 +164,7 @@ fun ExportFilesScreen( } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.LayersClear), + painter = rememberVectorPainter(image = Icons.Outlined.LayersClear), text = stringResource(R.string.export_files_screen_exclude_field), descriptionText = excludeOptions.filterIndexed { index, _ -> index in excludeCheckedList diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/importfiles/ImportFilesScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/importfiles/ImportFilesScreen.kt index f571941..fa1f4e4 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/importfiles/ImportFilesScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/data/importexport/file/importfiles/ImportFilesScreen.kt @@ -11,8 +11,8 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.Help -import androidx.compose.material.icons.filled.Done -import androidx.compose.material.icons.filled.FolderZip +import androidx.compose.material.icons.outlined.Done +import androidx.compose.material.icons.outlined.FolderZip import androidx.compose.material3.Icon import androidx.compose.material3.Scaffold import androidx.compose.material3.SegmentedButton @@ -97,7 +97,7 @@ fun ImportFilesScreen(viewModel: ImportFilesViewModel = hiltViewModel()) { floatingActionButton = { RaysExtendedFloatingActionButton( text = { Text(text = stringResource(R.string.import_files_screen_import)) }, - icon = { Icon(imageVector = Icons.Default.Done, contentDescription = null) }, + icon = { Icon(imageVector = Icons.Outlined.Done, contentDescription = null) }, onClick = { dispatch( ImportFilesIntent.Import( @@ -120,7 +120,7 @@ fun ImportFilesScreen(viewModel: ImportFilesViewModel = hiltViewModel()) { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.FolderZip), + painter = rememberVectorPainter(image = Icons.Outlined.FolderZip), text = stringResource(id = R.string.import_files_screen_select_file), descriptionText = fileUri.toString().ifBlank { null }, onClick = { pickFileLauncher.safeLaunch("application/zip") } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/imagesource/ImageSourceScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/imagesource/ImageSourceScreen.kt index fac2059..c610765 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/imagesource/ImageSourceScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/imagesource/ImageSourceScreen.kt @@ -6,7 +6,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.selection.selectableGroup import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ImageSearch +import androidx.compose.material.icons.outlined.ImageSearch import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.Scaffold import androidx.compose.material3.Text @@ -57,7 +57,7 @@ fun ImageSourceScreen() { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.ImageSearch), + painter = rememberVectorPainter(image = Icons.Outlined.ImageSearch), text = stringResource(R.string.image_screen_picker), descriptionText = stringResource(R.string.image_screen_picker_description), onClick = { openPickImageMethodBottomSheet = true } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/MlScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/MlScreen.kt index 48fca00..45a5124 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/MlScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/MlScreen.kt @@ -3,8 +3,8 @@ package com.skyd.rays.ui.screen.settings.ml import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Sell -import androidx.compose.material.icons.filled.TextFields +import androidx.compose.material.icons.outlined.Sell +import androidx.compose.material.icons.outlined.TextFields import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -46,7 +46,7 @@ fun MlScreen() { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Sell), + painter = rememberVectorPainter(image = Icons.Outlined.Sell), text = stringResource(id = R.string.classification_screen_name), descriptionText = stringResource(R.string.classification_screen_description), onClick = { navController.navigate(CLASSIFICATION_SCREEN_ROUTE) } @@ -54,7 +54,7 @@ fun MlScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.TextFields), + painter = rememberVectorPainter(image = Icons.Outlined.TextFields), text = stringResource(id = R.string.text_recognize_screen_name), descriptionText = stringResource(R.string.text_recognize_screen_description), onClick = { navController.navigate(TEXT_RECOGNIZE_SCREEN_ROUTE) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/ClassificationScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/ClassificationScreen.kt index e5a0a86..4694e49 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/ClassificationScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/ClassificationScreen.kt @@ -3,8 +3,8 @@ package com.skyd.rays.ui.screen.settings.ml.classification import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.DataThresholding -import androidx.compose.material.icons.filled.ModelTraining +import androidx.compose.material.icons.outlined.DataThresholding +import androidx.compose.material.icons.outlined.ModelTraining import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -50,7 +50,7 @@ fun ClassificationScreen() { ) { item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.ModelTraining), + painter = rememberVectorPainter(image = Icons.Outlined.ModelTraining), text = stringResource(id = R.string.classification_model_screen_name), descriptionText = stringResource( R.string.classification_model_screen_description, @@ -70,7 +70,7 @@ private fun ClassificationThresholdSettingItem() { val scope = rememberCoroutineScope() SliderSettingsItem( - imageVector = Icons.Default.DataThresholding, + imageVector = Icons.Outlined.DataThresholding, text = stringResource(id = R.string.classification_screen_threshold), value = LocalClassificationThreshold.current, onValueChange = { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/model/ClassificationModelScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/model/ClassificationModelScreen.kt index 94bf66b..00cb4a4 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/model/ClassificationModelScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/classification/model/ClassificationModelScreen.kt @@ -9,9 +9,10 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.CreateNewFolder import androidx.compose.material.icons.filled.Lightbulb -import androidx.compose.material.icons.filled.LightbulbCircle +import androidx.compose.material.icons.outlined.CreateNewFolder +import androidx.compose.material.icons.outlined.Lightbulb +import androidx.compose.material.icons.outlined.LightbulbCircle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost @@ -151,7 +152,7 @@ private fun ModelList( item { RadioSettingsItem( selected = classificationModel.isBlank(), - imageVector = Icons.Default.LightbulbCircle, + imageVector = Icons.Outlined.LightbulbCircle, text = stringResource(id = R.string.classification_model_screen_default), description = stringResource(id = R.string.classification_model_screen_default_name), onClick = { @@ -167,7 +168,7 @@ private fun ModelList( } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.CreateNewFolder), + painter = rememberVectorPainter(image = Icons.Outlined.CreateNewFolder), text = stringResource(id = R.string.classification_model_screen_select), descriptionText = stringResource( R.string.classification_model_screen_select_description, @@ -191,7 +192,7 @@ private fun ModelList( RadioSettingsItem( modifier = Modifier.background(MaterialTheme.colorScheme.background), selected = item.name == classificationModelName, - painter = rememberVectorPainter(image = Icons.Default.Lightbulb), + painter = rememberVectorPainter(image = Icons.Outlined.Lightbulb), text = item.name, description = item.path, onClick = { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/textrecognize/TextRecognizeScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/textrecognize/TextRecognizeScreen.kt index b5a107c..16ce66c 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/textrecognize/TextRecognizeScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/ml/textrecognize/TextRecognizeScreen.kt @@ -3,7 +3,7 @@ package com.skyd.rays.ui.screen.settings.ml.textrecognize import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.DataThresholding +import androidx.compose.material.icons.outlined.DataThresholding import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -54,7 +54,7 @@ private fun TextRecognizeThresholdSettingItem() { val scope = rememberCoroutineScope() SliderSettingsItem( - imageVector = Icons.Default.DataThresholding, + imageVector = Icons.Outlined.DataThresholding, text = stringResource(id = R.string.text_recognize_screen_threshold), value = LocalTextRecognizeThreshold.current, onValueChange = { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/PrivacyScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/PrivacyScreen.kt index 24880b5..1274c87 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/PrivacyScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/PrivacyScreen.kt @@ -3,8 +3,8 @@ package com.skyd.rays.ui.screen.settings.privacy import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.BlurOn -import androidx.compose.material.icons.filled.Screenshot +import androidx.compose.material.icons.outlined.BlurOn +import androidx.compose.material.icons.outlined.Screenshot import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -53,7 +53,7 @@ fun PrivacyScreen() { ) { item { SwitchSettingsItem( - imageVector = Icons.Default.Screenshot, + imageVector = Icons.Outlined.Screenshot, checked = LocalDisableScreenshot.current, text = stringResource(R.string.privacy_screen_disable_screenshot), description = stringResource(R.string.privacy_screen_disable_screenshot_description), @@ -69,7 +69,7 @@ fun PrivacyScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.BlurOn), + painter = rememberVectorPainter(Icons.Outlined.BlurOn), text = stringResource(R.string.blur_stickers_screen_name), descriptionText = stringResource(R.string.blur_stickers_screen_description), onClick = { navController.navigate(BLUR_STICKERS_SCREEN_ROUTE) }, diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/blurstickers/BlurStickersScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/blurstickers/BlurStickersScreen.kt index 99d7feb..0e43235 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/blurstickers/BlurStickersScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/privacy/blurstickers/BlurStickersScreen.kt @@ -7,11 +7,11 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.BlurLinear -import androidx.compose.material.icons.filled.BlurOn -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Tag +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.BlurLinear +import androidx.compose.material.icons.outlined.BlurOn +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Tag import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.Icon import androidx.compose.material3.InputChip @@ -74,7 +74,7 @@ fun BlurStickersScreen() { item { BannerItem { SwitchSettingsItem( - imageVector = Icons.Default.BlurOn, + imageVector = Icons.Outlined.BlurOn, checked = LocalBlurSticker.current, text = stringResource(R.string.enable), onCheckedChange = { @@ -108,14 +108,14 @@ private fun BlurStickersKeywordsSettingItem() { val blurStickersKeywords = LocalBlurStickerKeywords.current BaseSettingsItem( - painter = rememberVectorPainter(Icons.Default.Tag), + painter = rememberVectorPainter(Icons.Outlined.Tag), text = stringResource(R.string.blur_stickers_screen_blur_keywords), enabled = LocalBlurSticker.current, content = { RaysIconButton( enabled = LocalBlurSticker.current, onClick = { openAddDialog = true }, - imageVector = Icons.Default.Add, + imageVector = Icons.Outlined.Add, ) }, description = { @@ -139,7 +139,7 @@ private fun BlurStickersKeywordsSettingItem() { trailingIcon = { Icon( modifier = Modifier.size(AssistChipDefaults.IconSize), - imageVector = Icons.Default.Close, + imageVector = Icons.Outlined.Close, contentDescription = null ) } @@ -174,7 +174,7 @@ private fun BlurStickerRadiusSettingItem() { val scope = rememberCoroutineScope() SliderSettingsItem( - imageVector = Icons.Default.BlurLinear, + imageVector = Icons.Outlined.BlurLinear, text = stringResource(id = R.string.blur_stickers_screen_radius), enabled = LocalBlurSticker.current, valueRange = 0.01f..25f, diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/searchconfig/SearchConfigScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/searchconfig/SearchConfigScreen.kt index 36147b9..1b91a60 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/searchconfig/SearchConfigScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/searchconfig/SearchConfigScreen.kt @@ -7,10 +7,10 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Code -import androidx.compose.material.icons.filled.Domain -import androidx.compose.material.icons.filled.Done -import androidx.compose.material.icons.filled.JoinInner +import androidx.compose.material.icons.outlined.Code +import androidx.compose.material.icons.outlined.Domain +import androidx.compose.material.icons.outlined.Done +import androidx.compose.material.icons.outlined.JoinInner import androidx.compose.material3.FilterChip import androidx.compose.material3.FilterChipDefaults import androidx.compose.material3.Icon @@ -85,7 +85,7 @@ fun SearchConfigScreen(viewModel: SearchConfigViewModel = hiltViewModel()) { } item { SwitchSettingsItem( - imageVector = Icons.Default.Code, + imageVector = Icons.Outlined.Code, text = stringResource(id = R.string.search_config_screen_use_regex), description = stringResource(id = R.string.search_config_screen_use_regex_description), checked = useRegexSearch, @@ -100,7 +100,7 @@ fun SearchConfigScreen(viewModel: SearchConfigViewModel = hiltViewModel()) { } item { SwitchSettingsItem( - imageVector = Icons.Default.JoinInner, + imageVector = Icons.Outlined.JoinInner, text = stringResource(id = R.string.search_config_screen_intersect_search_by_space), description = stringResource(id = R.string.search_config_screen_intersect_search_by_space_description), checked = intersectSearchBySpace, @@ -142,7 +142,7 @@ fun SearchDomainItem( table: Pair, searchDomain: Map, onSetSearchDomain: (SearchDomainBean) -> Unit, - icon: Painter = rememberVectorPainter(image = Icons.Default.Domain), + icon: Painter = rememberVectorPainter(image = Icons.Outlined.Domain), ) { val (tableName, tableDisplayName) = table BaseSettingsItem( @@ -175,7 +175,7 @@ fun SearchDomainItem( leadingIcon = if (selected[columnIndex] == true) { { Icon( - imageVector = Icons.Default.Done, + imageVector = Icons.Outlined.Done, contentDescription = null, modifier = Modifier.size(FilterChipDefaults.IconSize) ) diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/ShareConfigScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/ShareConfigScreen.kt index 91901e5..1fbeafe 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/ShareConfigScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/ShareConfigScreen.kt @@ -3,10 +3,10 @@ package com.skyd.rays.ui.screen.settings.shareconfig import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Description -import androidx.compose.material.icons.filled.FileCopy -import androidx.compose.material.icons.filled.Link -import androidx.compose.material.icons.filled.MoveDown +import androidx.compose.material.icons.outlined.Description +import androidx.compose.material.icons.outlined.FileCopy +import androidx.compose.material.icons.outlined.Link +import androidx.compose.material.icons.outlined.MoveDown import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -58,7 +58,7 @@ fun ShareConfigScreen() { ) { item { SwitchSettingsItem( - imageVector = Icons.Default.Description, + imageVector = Icons.Outlined.Description, checked = LocalStickerExtName.current, text = stringResource(R.string.share_config_screen_file_extension), description = stringResource(R.string.share_config_screen_file_extension_description), @@ -73,7 +73,7 @@ fun ShareConfigScreen() { } item { SwitchSettingsItem( - imageVector = Icons.Default.FileCopy, + imageVector = Icons.Outlined.FileCopy, checked = LocalCopyStickerToClipboardWhenSharing.current, text = stringResource(R.string.share_config_screen_copy_sticker_to_clipboard), description = stringResource(R.string.share_config_screen_copy_sticker_to_clipboard_description), @@ -90,7 +90,7 @@ fun ShareConfigScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Link), + painter = rememberVectorPainter(image = Icons.Outlined.Link), text = stringResource(id = R.string.uri_string_share_screen_name), descriptionText = stringResource(id = R.string.uri_string_share_screen_description), onClick = { navController.navigate(URI_STRING_SHARE_SCREEN_ROUTE) } @@ -98,7 +98,7 @@ fun ShareConfigScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.MoveDown), + painter = rememberVectorPainter(image = Icons.Outlined.MoveDown), text = stringResource(id = R.string.auto_share_screen_name), descriptionText = stringResource(id = R.string.auto_share_screen_description), onClick = { navController.navigate(AUTO_SHARE_SCREEN_ROUTE) } diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/autoshare/AutoShareScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/autoshare/AutoShareScreen.kt index 0c6c235..3aad7b6 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/autoshare/AutoShareScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/autoshare/AutoShareScreen.kt @@ -7,8 +7,8 @@ import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Block -import androidx.compose.material.icons.filled.MoveDown +import androidx.compose.material.icons.outlined.Block +import androidx.compose.material.icons.outlined.MoveDown import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -87,7 +87,7 @@ fun AutoShareScreen() { item { BannerItem { SwitchSettingsItem( - imageVector = Icons.Default.MoveDown, + imageVector = Icons.Outlined.MoveDown, text = stringResource(id = R.string.enable), checked = autoShareEnabled, onCheckedChange = { @@ -98,7 +98,7 @@ fun AutoShareScreen() { } item { BaseSettingsItem( - painter = rememberVectorPainter(image = Icons.Default.Block), + painter = rememberVectorPainter(image = Icons.Outlined.Block), text = stringResource(id = R.string.auto_share_screen_ignore), descriptionText = stringResource(id = R.string.auto_share_screen_ignore_description), enabled = autoShareEnabled, diff --git a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/uristringshare/UriStringShareScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/uristringshare/UriStringShareScreen.kt index f688887..f1c3241 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/uristringshare/UriStringShareScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/settings/shareconfig/uristringshare/UriStringShareScreen.kt @@ -5,8 +5,8 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.Link +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Link import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost @@ -81,7 +81,7 @@ fun UriStringShareScreen(viewModel: UriStringShareViewModel = hiltViewModel()) { actions = { RaysIconButton( onClick = { openAddDialog = true }, - imageVector = Icons.Default.Add, + imageVector = Icons.Outlined.Add, contentDescription = stringResource(R.string.uri_string_share_screen_add_app_package) ) }, @@ -98,7 +98,7 @@ fun UriStringShareScreen(viewModel: UriStringShareViewModel = hiltViewModel()) { item { BannerItem { SwitchSettingsItem( - imageVector = Icons.Default.Link, + imageVector = Icons.Outlined.Link, text = stringResource(id = R.string.enable), checked = uriStringShare, onCheckedChange = { diff --git a/app/src/main/java/com/skyd/rays/ui/screen/stickerslist/StickersListScreen.kt b/app/src/main/java/com/skyd/rays/ui/screen/stickerslist/StickersListScreen.kt index feca2b5..41b95a1 100644 --- a/app/src/main/java/com/skyd/rays/ui/screen/stickerslist/StickersListScreen.kt +++ b/app/src/main/java/com/skyd/rays/ui/screen/stickerslist/StickersListScreen.kt @@ -8,7 +8,7 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.lazy.staggeredgrid.items import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.FolderZip +import androidx.compose.material.icons.outlined.FolderZip import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults @@ -86,7 +86,7 @@ fun StickersListScreen(query: String, viewModel: StickersListViewModel = hiltVie ?.stickerWithTagsList?.map { it.sticker.uuid }.orEmpty(), ) }, - imageVector = Icons.Default.FolderZip, + imageVector = Icons.Outlined.FolderZip, contentDescription = stringResource(id = R.string.stickers_list_screen_export_current_stickers), ) } diff --git a/app/src/main/java/com/skyd/rays/util/CommonUtil.kt b/app/src/main/java/com/skyd/rays/util/CommonUtil.kt index a7d24b5..f98da6d 100644 --- a/app/src/main/java/com/skyd/rays/util/CommonUtil.kt +++ b/app/src/main/java/com/skyd/rays/util/CommonUtil.kt @@ -37,7 +37,7 @@ object CommonUtil { .packageManager .getPackageInfo(appContext.packageName, 0) } - appVersionName = packageInfo.versionName + appVersionName = packageInfo.versionName.orEmpty() } catch (e: PackageManager.NameNotFoundException) { e.printStackTrace() } diff --git a/app/src/main/java/com/skyd/rays/util/StickerUtil.kt b/app/src/main/java/com/skyd/rays/util/StickerUtil.kt index 4bc4c52..1e937a6 100644 --- a/app/src/main/java/com/skyd/rays/util/StickerUtil.kt +++ b/app/src/main/java/com/skyd/rays/util/StickerUtil.kt @@ -1,7 +1,6 @@ package com.skyd.rays.util import android.content.ClipData -import android.content.ClipDescription import android.content.ClipboardManager import android.content.ContentValues import android.content.Context diff --git a/app/src/main/java/com/skyd/rays/util/coil/BlurTransformation.kt b/app/src/main/java/com/skyd/rays/util/coil/BlurTransformation.kt index ae1c299..8743b39 100644 --- a/app/src/main/java/com/skyd/rays/util/coil/BlurTransformation.kt +++ b/app/src/main/java/com/skyd/rays/util/coil/BlurTransformation.kt @@ -40,7 +40,11 @@ class BlurTransformation @JvmOverloads constructor( val scaledWidth = (input.width / sampling).toInt() val scaledHeight = (input.height / sampling).toInt() - val output = createBitmap(scaledWidth, scaledHeight, input.safeConfig) + val output = createBitmap( + scaledWidth, + scaledHeight, + input.safeConfig ?: Bitmap.Config.ARGB_8888, + ) //val output = pool.get(scaledWidth, scaledHeight, input.safeConfig) output.applyCanvas { scale(1 / sampling, 1 / sampling) @@ -102,5 +106,5 @@ class BlurTransformation @JvmOverloads constructor( } -internal val Bitmap.safeConfig: Bitmap.Config +internal val Bitmap.safeConfig: Bitmap.Config? get() = config diff --git a/app/src/main/res/resources.properties b/app/src/main/res/resources.properties new file mode 100644 index 0000000..63b46f9 --- /dev/null +++ b/app/src/main/res/resources.properties @@ -0,0 +1 @@ +unqualifiedResLocale=en \ No newline at end of file diff --git a/app/src/main/res/xml/locales_config.xml b/app/src/main/res/xml/locales_config.xml deleted file mode 100644 index 0b94693..0000000 --- a/app/src/main/res/xml/locales_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file