fix: fix app icon bad format

This commit is contained in:
Anthonyy232 committed 2025-12-26 23:00:04 -08:00
1 parent c947b6fc6f
commit 2aa4e6960d
39 files changed
+173 -48

No files matched your search

+4 -4
View File
@@ -25,9 +25,9 @@
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="false"
android:icon="@mipmap/app_icon"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/app_icon_round"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Paperize">
@@ -48,7 +48,7 @@
android:name=".presentation.MainActivity"
android:exported="true"
android:configChanges="uiMode|density|orientation|screenSize|screenLayout|keyboardHidden|keyboard"
android:theme="@style/Theme.Paperize">
android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -76,7 +76,7 @@
<service
android:name=".service.tile.WallpaperTileService"
android:exported="true"
android:icon="@drawable/ic_launcher_foreground"
android:icon="@mipmap/ic_launcher_foreground"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@@ -46,7 +46,7 @@ class PreferencesManager @Inject constructor(
val prefs = dataStore.data.first()
return AppSettings(
darkMode = prefs[booleanPreferencesKey(PreferenceKeys.DARK_MODE)] ?: false,
dynamicTheming = prefs[booleanPreferencesKey(PreferenceKeys.DYNAMIC_THEMING)] ?: true,
dynamicTheming = prefs[booleanPreferencesKey(PreferenceKeys.DYNAMIC_THEMING)] ?: false,
animate = prefs[booleanPreferencesKey(PreferenceKeys.ANIMATE)] ?: true,
firstLaunch = prefs[booleanPreferencesKey(PreferenceKeys.FIRST_LAUNCH)] ?: true,
currentHomeWallpaperId = prefs[stringPreferencesKey(PreferenceKeys.CURRENT_HOME_WALLPAPER_ID)],
@@ -57,7 +57,7 @@ class PreferencesManager @Inject constructor(
fun getAppSettingsFlow(): Flow<AppSettings> = dataStore.data.map { prefs ->
AppSettings(
darkMode = prefs[booleanPreferencesKey(PreferenceKeys.DARK_MODE)] ?: false,
dynamicTheming = prefs[booleanPreferencesKey(PreferenceKeys.DYNAMIC_THEMING)] ?: true,
dynamicTheming = prefs[booleanPreferencesKey(PreferenceKeys.DYNAMIC_THEMING)] ?: false,
animate = prefs[booleanPreferencesKey(PreferenceKeys.ANIMATE)] ?: true,
firstLaunch = prefs[booleanPreferencesKey(PreferenceKeys.FIRST_LAUNCH)] ?: true,
currentHomeWallpaperId = prefs[stringPreferencesKey(PreferenceKeys.CURRENT_HOME_WALLPAPER_ID)],
@@ -5,7 +5,7 @@ package com.anthonyla.paperize.domain.model
*/
data class AppSettings(
val darkMode: Boolean? = null, // null = system default, true = dark, false = light
val dynamicTheming: Boolean = true,
val dynamicTheming: Boolean = false,
val animate: Boolean = true,
val firstLaunch: Boolean = true,
val currentHomeWallpaperId: String? = null,
@@ -3,6 +3,7 @@ package com.anthonyla.paperize.presentation
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
@@ -30,6 +31,7 @@ import dagger.hilt.android.AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
setContent {
@@ -42,7 +44,7 @@ class MainActivity : ComponentActivity() {
PaperizeTheme(
darkMode = appSettings?.darkMode ?: false,
dynamicTheming = appSettings?.dynamicTheming ?: true
dynamicTheming = appSettings?.dynamicTheming ?: false
) {
Surface(
modifier = Modifier.fillMaxSize(),
@@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@@ -28,7 +27,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
@@ -37,9 +35,9 @@ import com.anthonyla.paperize.presentation.theme.AppSpacing
@Composable
fun OnboardingLayout(
icon: ImageVector,
title: String,
modifier: Modifier = Modifier,
iconContent: @Composable () -> Unit,
content: @Composable () -> Unit,
actions: @Composable () -> Unit
) {
@@ -81,12 +79,7 @@ fun OnboardingLayout(
),
contentAlignment = Alignment.Center
) {
Icon(
imageVector = icon,
contentDescription = null,
modifier = Modifier.size(AppIconSizes.huge),
tint = MaterialTheme.colorScheme.primary
)
iconContent()
}
}
@@ -20,6 +20,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat
import com.anthonyla.paperize.R
@@ -51,9 +52,16 @@ fun NotificationPermissionScreen(
}
OnboardingLayout(
icon = Icons.Default.Notifications,
title = stringResource(R.string.notification_permission_title),
modifier = modifier,
iconContent = {
Icon(
imageVector = Icons.Default.Notifications,
contentDescription = null,
modifier = Modifier.size(AppIconSizes.huge),
tint = MaterialTheme.colorScheme.primary
)
},
content = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -178,7 +178,7 @@ fun SettingsScreen(
SettingSwitchItem(
title = stringResource(R.string.dynamic_theming),
description = stringResource(R.string.material_you),
checked = appSettings?.dynamicTheming ?: true,
checked = appSettings?.dynamicTheming ?: false,
onCheckedChange = { viewModel.updateDynamicTheming(it) }
)
@@ -1,16 +1,29 @@
package com.anthonyla.paperize.presentation.screens.startup
import com.anthonyla.paperize.presentation.theme.AppIconSizes
import com.anthonyla.paperize.presentation.components.OnboardingLayout
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Wallpaper
import androidx.compose.material3.*
import android.graphics.Bitmap
import android.graphics.Canvas
import androidx.appcompat.content.res.AppCompatResources
import com.anthonyla.paperize.presentation.components.OnboardingLayout
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
@@ -27,10 +40,27 @@ fun StartupScreen(
onAgree: () -> Unit,
modifier: Modifier = Modifier
) {
val context = LocalContext.current
val appIcon = remember {
val drawable = AppCompatResources.getDrawable(context, R.mipmap.ic_launcher_round)!!
val size = 192 // Use a fixed high resolution size
val bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
drawable.setBounds(0, 0, size, size)
drawable.draw(canvas)
bitmap.asImageBitmap()
}
OnboardingLayout(
icon = Icons.Default.Wallpaper,
title = stringResource(R.string.app_name),
modifier = modifier,
iconContent = {
Image(
bitmap = appIcon,
contentDescription = null,
modifier = Modifier.size(100.dp)
)
},
content = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.unit.dp
import com.anthonyla.paperize.R
import com.anthonyla.paperize.core.constants.Constants
@@ -61,9 +62,16 @@ fun StoragePermissionScreen(
}
OnboardingLayout(
icon = Icons.Default.Folder,
title = stringResource(R.string.storage_permission_title),
modifier = modifier,
iconContent = {
Icon(
imageVector = Icons.Default.Folder,
contentDescription = null,
modifier = Modifier.size(AppIconSizes.huge),
tint = MaterialTheme.colorScheme.primary
)
},
content = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -444,7 +444,7 @@ fun WallpaperScreen(
}
}
}
} else {
} else if (wallpaperMode == WallpaperMode.LIVE) {
// Live Mode: Single Album Selector
Surface(
color = MaterialTheme.colorScheme.surfaceContainerLow,
@@ -16,6 +16,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.unit.dp
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import com.anthonyla.paperize.R
@@ -35,9 +36,16 @@ fun WallpaperModeSelectionScreen(
var selectedMode by remember { mutableStateOf<WallpaperMode?>(null) }
OnboardingLayout(
icon = Icons.Default.Wallpaper,
title = stringResource(R.string.choose_wallpaper_mode),
modifier = modifier,
iconContent = {
Icon(
imageVector = Icons.Default.Wallpaper,
contentDescription = null,
modifier = Modifier.size(AppIconSizes.huge),
tint = MaterialTheme.colorScheme.primary
)
},
content = {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -277,7 +277,7 @@ class WallpaperChangeService : Service() {
return NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
.setContentTitle(getString(R.string.app_name))
.setContentText(getString(R.string.changing_wallpaper))
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setSmallIcon(R.mipmap.ic_launcher_foreground)
.setContentIntent(pendingIntent)
.setOngoing(true)
.build()
@@ -298,7 +298,7 @@ class WallpaperChangeService : Service() {
val notification = NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
.setContentTitle(title)
.setContentText(message)
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setSmallIcon(R.mipmap.ic_launcher_foreground)
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.setPriority(NotificationCompat.PRIORITY_HIGH)
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
@@ -1,14 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF"/>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+6
View File
@@ -18,4 +18,10 @@
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
<!-- Splash Screen Theme -->
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher</item>
<item name="postSplashScreenTheme">@style/Theme.Paperize</item>
</style>
</resources>
+1 -1
View File
@@ -2,4 +2,4 @@
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/live_wallpaper_description"
android:settingsActivity="com.anthonyla.paperize.presentation.MainActivity"
android:thumbnail="@mipmap/app_icon" />
android:thumbnail="@mipmap/ic_launcher" />