fix android trivia experience

This commit is contained in:
pj committed 2026-09-10 02:57:55 +05:30
1 parent 86450bef44
commit c6b2eb3cce
69 files changed
+3493 -1572

No files matched your search

+2
View File
@@ -3,7 +3,9 @@
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="Bert's Atlas"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
@@ -2,6 +2,7 @@ package app.bertsatlas
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.OnBackPressedCallback
import androidx.activity.compose.setContent
import app.bertsatlas.data.buildBertsAtlasDatabase
import app.bertsatlas.data.createPreferencesStore
@@ -9,9 +10,18 @@ import app.bertsatlas.data.getDatabaseBuilder
class MainActivity : ComponentActivity() {
private var controller: AppController? = null
private val appBackCallback = object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (controller?.handleBack() == true) return
isEnabled = false
onBackPressedDispatcher.onBackPressed()
isEnabled = true
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
onBackPressedDispatcher.addCallback(this, appBackCallback)
val database = getDatabaseBuilder(this).buildBertsAtlasDatabase()
val preferences = createPreferencesStore(filesDir.resolve("berts-atlas.preferences_pb").absolutePath)
val feedback = AndroidDeviceFeedback(this)
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="512" android:viewportHeight="512">
<group android:scaleX="0.66" android:scaleY="0.66" android:translateX="55" android:translateY="85">
<path android:fillColor="#F7BFBE" android:strokeColor="#27635B" android:strokeWidth="17" android:pathData="M105,270C47,237 68,151 135,146C138,74 231,54 272,107C327,62 414,105 402,177C465,207 444,297 387,312C369,397 264,415 214,363C152,395 79,335 105,270Z"/>
<path android:fillColor="#F6E9E1" android:strokeColor="#27635B" android:strokeWidth="19" android:pathData="M154,205H217C232,205 245,217 245,233V269C245,285 232,297 217,297H154C138,297 126,285 126,269V233C126,217 138,205 154,205Z"/>
<path android:fillColor="#F6E9E1" android:strokeColor="#27635B" android:strokeWidth="19" android:pathData="M296,205H359C375,205 387,217 387,233V269C387,285 375,297 359,297H296C280,297 268,285 268,269V233C268,217 280,205 296,205Z"/>
<path android:strokeColor="#27635B" android:strokeWidth="19" android:pathData="M245,245L268,245"/>
<path android:fillColor="#27635B" android:pathData="M185,250m-14,0a14,14 0,1 0,28 0a14,14 0,1 0,-28 0M328,250m-14,0a14,14 0,1 0,28 0a14,14 0,1 0,-28 0"/>
<path android:strokeColor="#27635B" android:strokeWidth="15" android:strokeLineCap="round" android:pathData="M204,325Q256,372 309,325"/>
</group>
<group android:scaleX="0.82" android:scaleY="0.82" android:translateX="64" android:translateY="41">
<path android:fillColor="#F1DCC7" android:strokeColor="#27635B" android:strokeWidth="10" android:pathData="M300,105L332,91L360,104L390,91L418,105L418,196L390,182L360,195L332,182L300,196Z"/>
<path android:fillColor="#B7CFC8" android:strokeColor="#27635B" android:strokeWidth="10" android:pathData="M332,91L360,104L360,195L332,182Z"/>
<path android:fillColor="#E9AF8B" android:strokeColor="#27635B" android:strokeWidth="10" android:pathData="M390,91L418,105L418,196L390,182Z"/>
<path android:strokeColor="#E1814E" android:strokeWidth="7" android:strokeLineCap="round" android:pathData="M308,157C328,139 336,164 354,147C370,133 375,118 392,135C402,147 406,153 414,150"/>
</group>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/parchment" />
<item android:drawable="@drawable/app_icon_foreground" android:gravity="center" android:width="192dp" android:height="192dp" />
</layer-list>
@@ -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="@color/parchment" />
<foreground android:drawable="@drawable/app_icon_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="@color/parchment" />
<foreground android:drawable="@drawable/app_icon_foreground" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:style/Theme.Material.Light.NoActionBar">
<item name="android:fontFamily">sans</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:statusBarColor">@color/parchment</item>
<item name="android:navigationBarColor">@color/parchment</item>
<item name="android:windowSplashScreenBackground">@color/parchment</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/app_icon_foreground</item>
<item name="android:windowSplashScreenIconBackgroundColor">@color/parchment</item>
</style>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="parchment">#F6E9E1</color>
</resources>
+3 -3
View File
@@ -3,8 +3,8 @@
<style name="AppTheme" parent="android:style/Theme.Material.Light.NoActionBar">
<item name="android:fontFamily">sans</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:statusBarColor">#F7F0DF</item>
<item name="android:navigationBarColor">#F7F0DF</item>
<item name="android:statusBarColor">#F6E9E1</item>
<item name="android:navigationBarColor">#F6E9E1</item>
<item name="android:windowBackground">@drawable/splash_background</item>
</style>
</resources>