Implement new splash screen and dynamic color

This commit is contained in:
Matthieu 2022-10-15 14:20:41 +02:00
parent aa7aa04df6
commit 48752e8db2
28 changed files with 3713 additions and 159 deletions

View File

@ -16,21 +16,21 @@ jacoco.toolVersion = "0.8.7"
android {
namespace 'org.pixeldroid.app'
compileSdkVersion 32
buildToolsVersion '31.0.0'
compileSdkVersion 33
buildToolsVersion '33.0.0'
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
}
defaultConfig {
minSdkVersion 23
targetSdkVersion 32
versionCode 18
targetSdkVersion 33
versionCode 19
versionName "1.0.beta" + versionCode
testInstrumentationRunner "org.pixeldroid.app.testUtility.TestRunner"
@ -123,32 +123,33 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
/**
* AndroidX dependencies:
*/
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.core:core-splashscreen:1.0.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
implementation "androidx.browser:browser:1.4.0"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
implementation 'androidx.paging:paging-runtime-ktx:3.1.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.5.0"
implementation "androidx.annotation:annotation:1.4.0"
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
implementation "androidx.annotation:annotation:1.5.0"
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation "androidx.activity:activity-ktx:1.5.0"
implementation 'androidx.fragment:fragment-ktx:1.5.0'
implementation "androidx.activity:activity-ktx:1.6.0"
implementation 'androidx.fragment:fragment-ktx:1.5.3'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'androidx.media2:media2-widget:1.2.1'
implementation 'androidx.media2:media2-player:1.2.1'
@ -164,7 +165,7 @@ dependencies {
// CameraX View class
implementation "androidx.camera:camera-view:$cameraX_version"
def room_version = "2.4.2"
def room_version = "2.4.3"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
@ -176,16 +177,17 @@ dependencies {
*/
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
implementation 'com.arthenica:ffmpeg-kit-min:4.5.1-1.LTS'
implementation 'com.arthenica:ffmpeg-kit-min-gpl:5.1.LTS'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.7.0-rc01'
//Dagger (dependency injection)
implementation 'com.google.dagger:dagger-android:2.42'
implementation 'com.google.dagger:dagger-android-support:2.42'
implementation 'com.google.dagger:dagger-android:2.44'
implementation 'com.google.dagger:dagger-android-support:2.44'
// if you use the support libraries
kapt 'com.google.dagger:dagger-android-processor:2.42'
kapt 'com.google.dagger:dagger-compiler:2.42'
kapt 'com.google.dagger:dagger-android-processor:2.44'
kapt 'com.google.dagger:dagger-compiler:2.44'
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
@ -199,18 +201,18 @@ dependencies {
implementation 'info.androidhive:imagefilters:1.0.7'
implementation 'com.github.yalantis:ucrop:2.2.8-native'
implementation('com.github.bumptech.glide:glide:4.13.2') {
implementation('com.github.bumptech.glide:glide:4.14.2') {
exclude group: "com.android.support"
}
implementation 'com.github.bumptech.glide:okhttp3-integration:4.13.2'
implementation('com.github.bumptech.glide:recyclerview-integration:4.13.2') {
implementation 'com.github.bumptech.glide:okhttp3-integration:4.14.2'
implementation('com.github.bumptech.glide:recyclerview-integration:4.14.2') {
// Excludes the support library because it's already included by Glide.
transitive = false
}
implementation 'com.github.bumptech.glide:annotations:4.13.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
kapt 'com.github.bumptech.glide:compiler:4.13.2'
implementation 'com.github.bumptech.glide:annotations:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
@ -219,9 +221,9 @@ dependencies {
implementation 'com.mikepenz:materialdrawer-nav:9.0.1'
//iconics
implementation 'com.mikepenz:iconics-core:5.3.4'
implementation 'com.mikepenz:iconics-core:5.4.0'
implementation 'com.mikepenz:materialdrawer-iconics:9.0.1'
implementation 'com.mikepenz:iconics-views:5.3.4'
implementation 'com.mikepenz:iconics-views:5.4.0'
implementation 'com.mikepenz:google-material-typeface:4.0.0.2-kotlin@aar'
@ -242,7 +244,7 @@ dependencies {
androidTestUtil 'com.linkedin.testbutler:test-butler-app:2.2.1'
androidTestImplementation 'androidx.work:work-testing:2.7.1'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.33.2'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.34.0'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation 'junit:junit:4.13.2'
testImplementation "androidx.room:room-testing:$room_version"

View File

@ -11,6 +11,12 @@
android:name="android.hardware.camera.any"
android:required="false" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<application
android:name=".utils.PixelDroidApplication"
@ -89,8 +95,8 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.App.Starting"
android:screenOrientation="sensorPortrait"
android:theme="@style/AppTheme.Launcher"
android:windowSoftInputMode="adjustPan"
tools:ignore="LockedOrientationActivity">
<intent-filter>

View File

@ -11,6 +11,7 @@ import android.view.View
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.GravityCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
@ -21,6 +22,7 @@ import androidx.viewpager2.widget.ViewPager2
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
import com.bumptech.glide.Glide
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.color.DynamicColors
import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
import com.mikepenz.materialdrawer.iconics.iconicsIcon
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem
@ -68,6 +70,11 @@ class MainActivity : BaseThemedWithoutBarActivity() {
@OptIn(ExperimentalPagingApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
// Workaround for dynamic colors not applying due to splash screen?
DynamicColors.applyToActivityIfAvailable(this)
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

View File

@ -76,12 +76,12 @@ class NestedScrollableHost(context: Context, attrs: AttributeSet? = null) :
return true
}
override fun onDoubleTap(e: MotionEvent?): Boolean {
override fun onDoubleTap(e: MotionEvent): Boolean {
doubleTapCallback?.invoke()
return super.onDoubleTap(e)
}
override fun onSingleTapConfirmed(e: MotionEvent?): Boolean {
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
// Disable opening AlbumActivity if the only image is a video (let the video open directly)
if(images.size == 1 && images.first().type == Attachment.AttachmentType.video){
return super.onSingleTapConfirmed(e)

View File

@ -7,7 +7,6 @@ import org.pixeldroid.app.databinding.OpenSourceLicenseBinding
import org.pixeldroid.app.settings.licenseObjects.Libraries
import org.pixeldroid.app.settings.licenseObjects.OpenSourceItem
import org.pixeldroid.app.utils.BaseThemedWithBarActivity
import org.pixeldroid.app.utils.themeActionBar
/**
* Displays licenses for all app dependencies. JSON is
@ -18,7 +17,6 @@ class LicenseActivity: BaseThemedWithBarActivity() {
private lateinit var binding: OpenSourceLicenseBinding
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(themeActionBar())
super.onCreate(savedInstanceState)
binding = OpenSourceLicenseBinding.inflate(layoutInflater)

View File

@ -57,11 +57,11 @@ class SettingsActivity : BaseThemedWithBarActivity(), SharedPreferences.OnShared
}
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
when (key) {
"theme" -> {
setThemeFromPreferences(sharedPreferences, resources)
"language" -> {
recreateWithRestartStatus()
}
"language" -> {
"theme" -> {
setThemeFromPreferences(sharedPreferences, resources)
recreateWithRestartStatus()
}
"themeColor" -> {

View File

@ -3,6 +3,7 @@ package org.pixeldroid.app.settings
import android.content.Context
import android.content.res.ColorStateList
import android.content.res.TypedArray
import android.os.Build
import android.os.Bundle
import android.util.AttributeSet
import android.util.TypedValue
@ -110,6 +111,7 @@ class ColorPreference constructor(context: Context, attrs: AttributeSet? = null)
thumbnail?.visibility = if (thumbColor == null) View.GONE else View.VISIBLE
@ColorRes
val colorCode: Int = when(thumbColor){
-1 -> android.R.color.transparent
1 -> R.color.seed2
2 -> R.color.seed3
3 -> R.color.seed4
@ -162,6 +164,13 @@ class ColorPickerView(context: Context?, attrs: AttributeSet? = null) : FrameLay
init {
binding = ColorDialogBinding.inflate(LayoutInflater.from(context),this, true)
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
binding.dynamicColorSwitch.isVisible = true
binding.dynamicColorSwitch.setOnCheckedChangeListener{ _, isChecked ->
binding.themeChooser.isVisible = !isChecked
color = if(isChecked) -1 else 0
}
}
binding.theme1.setOnClickListener { color = 0 }
binding.theme2.setOnClickListener { color = 1 }
binding.theme3.setOnClickListener { color = 2 }
@ -188,5 +197,8 @@ class ColorPickerView(context: Context?, attrs: AttributeSet? = null) : FrameLay
3 -> binding.theme4
else -> null
}?.let { changeConstraint(it) }
// Check switch if set to dynamic
binding.dynamicColorSwitch.isChecked = value == -1
}
}

View File

@ -4,7 +4,8 @@ import android.os.Bundle
open class BaseThemedWithBarActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(themeActionBar())
// Set theme when we chose one
themeActionBar()?.let { setTheme(it) }
super.onCreate(savedInstanceState)
}
}

View File

@ -4,7 +4,8 @@ import android.os.Bundle
open class BaseThemedWithoutBarActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(themeNoActionBar())
// Set theme when we chose one
themeNoActionBar()?.let { setTheme(it) }
super.onCreate(savedInstanceState)
}
}

View File

@ -21,6 +21,6 @@ class PixelDroidGlideModule : AppGlideModule() {
.addNetworkInterceptor(PixelfedAPI.headerInterceptor)
.build()
val factory = OkHttpUrlLoader.Factory(client)
glide.registry.replace(GlideUrl::class.java, InputStream::class.java, factory)
registry.replace(GlideUrl::class.java, InputStream::class.java, factory)
}
}

View File

@ -27,8 +27,7 @@ class PixelDroidApplication: Application() {
.build()
mApplicationComponent.inject(this)
//TODO put condition depending on setting to apply dynamic colours (android 12+)
if(false) DynamicColors.applyToActivitiesIfAvailable(this)
DynamicColors.applyToActivitiesIfAvailable(this)
}
fun getAppComponent(): ApplicationComponent {

View File

@ -211,22 +211,26 @@ fun setThemeFromPreferences(preferences: SharedPreferences, resources: Resources
}
@StyleRes
fun Context.themeNoActionBar(): Int {
fun Context.themeNoActionBar(): Int? {
return when(PreferenceManager.getDefaultSharedPreferences(this).getInt("themeColor", 0)) {
// No theme was chosen: the user wants to use the system dynamic color (from wallpaper for example)
-1 -> null
1 -> R.style.AppTheme2_NoActionBar
2 -> R.style.AppTheme3_NoActionBar
3 -> R.style.AppTheme4_NoActionBar
else -> R.style.AppTheme_NoActionBar
else -> R.style.AppTheme5_NoActionBar
}
}
@StyleRes
fun Context.themeActionBar(): Int {
fun Context.themeActionBar(): Int? {
return when(PreferenceManager.getDefaultSharedPreferences(this).getInt("themeColor", 0)) {
// No theme was chosen: the user wants to use the system dynamic color (from wallpaper for example)
-1 -> null
1 -> R.style.AppTheme2
2 -> R.style.AppTheme3
3 -> R.style.AppTheme4
else -> R.style.AppTheme
else -> R.style.AppTheme5
}
}

View File

@ -37,7 +37,7 @@ interface PixelfedAPI {
val headerInterceptor = Interceptor { chain ->
val requestBuilder = chain.request().newBuilder()
.removeHeader("User-Agent")
.addHeader("User-Agent", "PixelDroid") //TODO check if okay?
.addHeader("User-Agent", "PixelDroid")
chain.proceed(requestBuilder.build())
}

View File

@ -151,7 +151,6 @@ open class Status(
val shareIntent: Intent = Intent.createChooser(Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_STREAM, file)
data = file
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
type = "image/$ext"
}, null)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color -->
<item android:drawable="@android:color/black"/>
<!-- The drawable (mascot) -->
<item android:drawable="@drawable/mascot"
android:gravity="center"/>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color -->
<item android:drawable="@android:color/white"/>
<!-- The drawable (mascot) -->
<item android:drawable="@drawable/mascot"
android:gravity="center"/>
</layer-list>

View File

@ -5,89 +5,108 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/theme1"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme2"
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/dynamicColorSwitch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:lineSpacingExtra="8sp"
android:text="Use dynamic color from your system"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed" />
<ImageButton
android:id="@+id/theme2"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme3"
app:layout_constraintStart_toEndOf="@+id/theme1"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed2" />
<ImageButton
android:id="@+id/theme3"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme4"
app:layout_constraintStart_toEndOf="@+id/theme2"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed3" />
<ImageButton
android:id="@+id/theme4"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/theme3"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed4" />
tools:visibility="visible" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/chosenTheme"
android:layout_width="48dp"
android:layout_height="48dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/theme1"
app:layout_constraintStart_toStartOf="@id/theme1"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible">
android:id="@+id/themeChooser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/dynamicColorSwitch">
<ImageView
android:id="@+id/chosenThemeOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/color_chosen"
<ImageButton
android:id="@+id/theme1"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme2"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="#4D000000" />
app:tint="@color/seed" />
<ImageView
android:id="@+id/chosenThemeCheckMark"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/color_chosen"
<ImageButton
android:id="@+id/theme2"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme3"
app:layout_constraintStart_toEndOf="@+id/theme1"
app:layout_constraintTop_toTopOf="@+id/theme1"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed2" />
<ImageButton
android:id="@+id/theme3"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/theme4"
app:layout_constraintStart_toEndOf="@+id/theme2"
app:layout_constraintTop_toTopOf="@+id/theme2"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed3" />
<ImageButton
android:id="@+id/theme4"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/color_choice_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_check_24" />
app:layout_constraintStart_toEndOf="@+id/theme3"
app:layout_constraintTop_toTopOf="@+id/theme3"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="@color/seed4" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/chosenTheme"
android:layout_width="48dp"
android:layout_height="48dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/theme1"
app:layout_constraintStart_toStartOf="@id/theme1"
app:layout_constraintTop_toTopOf="@+id/theme1"
tools:visibility="visible">
<ImageView
android:id="@+id/chosenThemeOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/color_chosen"
app:srcCompat="@drawable/circle_black_24dp"
app:tint="#4D000000" />
<ImageView
android:id="@+id/chosenThemeCheckMark"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/color_chosen"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_check_24" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,6 +1,10 @@
<resources>
<style name="AppTheme" parent="Theme.Material3.Dark">
<item name="colorPrimary">@android:color/transparent</item>
</style>
<style name="AppTheme5" parent="Theme.Material3.Dark">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>

View File

@ -1,12 +1,25 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme.Launcher">
<item name="android:windowBackground">@drawable/theme</item>
<item name="colorPrimaryDark">?android:attr/colorBackground</item>
<!-- Splash screen theme. -->
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<!-- Set the splash screen background, animated icon, and animation duration. -->
<item name="windowSplashScreenBackground">?android:attr/colorBackground</item>
<!-- Use windowSplashScreenAnimatedIcon to add either a drawable or an
animated drawable. One of these is required. -->
<!-- TODO get rid of duplicated mascot/mascot_small somehow -->
<item name="windowSplashScreenAnimatedIcon">@drawable/mascot_small</item>
<!-- Set the theme of the Activity that directly follows your splash screen. -->
<!-- Required -->
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.PopupOverlay" parent="Theme.Material3.Light" />
<style name="AppTheme.ActionBar.Transparent" parent="AppTheme">
@ -22,26 +35,35 @@
<item name="android:windowTranslucentStatus">true</item>
</style>
<style name="AppTheme.NoActionBar">
<style name="AppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme2.NoActionBar">
<style name="AppTheme2.NoActionBar" parent="AppTheme2">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme3.NoActionBar">
<style name="AppTheme3.NoActionBar" parent="AppTheme3">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme4.NoActionBar">
<style name="AppTheme4.NoActionBar" parent="AppTheme4">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme5.NoActionBar" parent="AppTheme5">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme" parent="Theme.Material3.Light">
<item name="colorPrimary">@android:color/transparent</item>
</style>
<style name="AppTheme5" parent="Theme.Material3.Light">
<item name="materialDrawerStyle">@style/Widget.MaterialDrawerStyle</item>
<item name="materialDrawerHeaderStyle">@style/Widget.MaterialDrawerHeaderStyle</item>
<item name="colorPrimary">@color/md_theme_light_primary</item>

View File

@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0-rc01'
classpath 'com.android.tools.build:gradle:8.0.0-alpha03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#Tue Jul 26 13:21:08 GMT 2022
#Fri Oct 14 13:37:44 GMT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionSha256Sum=cb87f222c5585bd46838ad4db78463a5c5f3d336e5e2b98dc7c0c586527351c2
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=8cc27038d5dbd815759851ba53e70cf62e481b87494cc97cfd97982ada5ba634
zipStorePath=wrapper/dists