Skip to content

Commit

Permalink
6.8.3 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Sep 30, 2024
1 parent 89143c6 commit 03cb641
Show file tree
Hide file tree
Showing 22 changed files with 702 additions and 1,196 deletions.
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ android {
testApplicationId "ac.mdiq.podcini.tests"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

versionCode 3020259
versionName "6.8.2"
versionCode 3020260
versionName "6.8.3"

applicationId "ac.mdiq.podcini.R"
def commit = ""
Expand Down Expand Up @@ -171,6 +171,7 @@ android {

dependencies {
implementation libs.androidx.material3.android
implementation libs.androidx.material3

/** Desugaring for using VistaGuide **/
coreLibraryDesugaring libs.desugar.jdk.libs.nio
Expand All @@ -179,7 +180,7 @@ dependencies {
def composeBom = libs.androidx.compose.bom
implementation composeBom
androidTestImplementation composeBom
implementation libs.androidx.material
// implementation libs.androidx.material
implementation libs.androidx.ui.tooling.preview
debugImplementation libs.androidx.ui.tooling
implementation libs.androidx.constraintlayout.compose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import android.widget.ImageView
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import androidx.annotation.OptIn
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -108,7 +108,7 @@ class ShareReceiverActivity : AppCompatActivity() {
)
Text(
text = stringResource(R.string.pref_video_mode_audio_only),
style = MaterialTheme.typography.body1.merge(),
style = MaterialTheme.typography.bodyLarge.merge(),
)
}
Button(onClick = {
Expand Down
28 changes: 14 additions & 14 deletions app/src/main/kotlin/ac/mdiq/podcini/ui/compose/AppTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import android.util.TypedValue
import androidx.annotation.AttrRes
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Shapes
import androidx.compose.material.darkColors
import androidx.compose.material.lightColors
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Shapes
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.material.Typography
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
Expand All @@ -26,12 +26,12 @@ import androidx.core.content.ContextCompat
private val TAG = "AppTheme"

val Typography = Typography(
h1 = TextStyle(
displayLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Bold,
fontSize = 30.sp
),
body1 = TextStyle(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp
Expand Down Expand Up @@ -65,10 +65,10 @@ fun getSecondaryColor(context: Context): Color {
return Color(getColorFromAttr(context, R.attr.colorSecondary))
}

val LightColors = lightColors(
val LightColors = lightColorScheme(
primary = Color(0xFF6200EE),
primaryVariant = Color(0xFF3700B3),
secondary = Color(0xFF03DAC6),
secondary = Color(0xFF3700B3),
tertiary = Color(0xFF03DAC6),
background = Color(0xFFFFFFFF),
surface = Color(0xFFFFFFFF),
error = Color(0xFFB00020),
Expand All @@ -79,10 +79,10 @@ val LightColors = lightColors(
onError = Color(0xFFFFFFFF)
)

val DarkColors = darkColors(
val DarkColors = darkColorScheme(
primary = Color(0xFFBB86FC),
primaryVariant = Color(0xFF3700B3),
secondary = Color(0xFF03DAC6),
secondary = Color(0xFF3700B3),
tertiary = Color(0xFF03DAC6),
background = Color(0xFF121212),
surface = Color(0xFF121212),
error = Color(0xFFCF6679),
Expand Down Expand Up @@ -119,7 +119,7 @@ fun CustomTheme(context: Context, content: @Composable () -> Unit) {
}

MaterialTheme(
colors = colors,
colorScheme = colors,
typography = Typography,
shapes = Shapes,
content = content
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/kotlin/ac/mdiq/podcini/ui/compose/Composables.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ac.mdiq.podcini.ui.compose

import androidx.compose.material.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.platform.LocalContext

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun Spinner(
items: List<String>,
Expand Down Expand Up @@ -33,14 +33,12 @@ fun Spinner(
onDismissRequest = { expanded = false }
) {
items.forEach { item ->
DropdownMenuItem(
DropdownMenuItem(text = { Text(item) },
onClick = {
onItemSelected(item)
expanded = false
}
) {
Text(text = item)
}
)
}
}
}
Expand Down
Loading

0 comments on commit 03cb641

Please sign in to comment.