build: started implementing language picker via appcompat instead of automatically generating language configurations to maintain compatibility with Android versions below 13

This commit is contained in:
antonio 2023-08-17 14:07:56 +02:00
parent 74b4b04693
commit a29cee488e
4 changed files with 19 additions and 6 deletions

View file

@ -62,10 +62,6 @@ android {
viewBinding true
}
androidResources {
generateLocaleConfig true
}
namespace 'com.cappielloantonio.tempo'
}
@ -81,6 +77,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.room:room-runtime:2.5.2'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation "androidx.appcompat:appcompat:1.6.1"
// Android Material
implementation 'com.google.android.material:material:1.9.0'

View file

@ -18,7 +18,8 @@
android:supportsRtl="true"
android:theme="@style/AppTheme.SplashScreen"
android:usesCleartextTraffic="true"
android:allowBackup="false">
android:allowBackup="false"
android:localeConfig="@xml/locale_config">
<meta-data
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
@ -33,6 +34,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".service.MediaService"
android:foregroundServiceType="mediaPlayback"
@ -42,6 +44,7 @@
<action android:name="androidx.media3.session.MediaBrowserService" />
</intent-filter>
</service>
<service android:name=".service.DownloaderService"
android:foregroundServiceType="dataSync"
android:exported="true">
@ -50,5 +53,14 @@
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false">
<meta-data
android:name="autoStoreLocales"
android:value="true" />
</service>
</application>
</manifest>

View file

@ -1 +0,0 @@
unqualifiedResLocale=en-US

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en"/> <!-- English -->
<locale android:name="de-DE"/> <!-- German -->
</locale-config>