6.8.3 commit
This commit is contained in:
parent
89143c60d3
commit
03cb641080
|
@ -31,8 +31,8 @@ android {
|
||||||
testApplicationId "ac.mdiq.podcini.tests"
|
testApplicationId "ac.mdiq.podcini.tests"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
versionCode 3020259
|
versionCode 3020260
|
||||||
versionName "6.8.2"
|
versionName "6.8.3"
|
||||||
|
|
||||||
applicationId "ac.mdiq.podcini.R"
|
applicationId "ac.mdiq.podcini.R"
|
||||||
def commit = ""
|
def commit = ""
|
||||||
|
@ -171,6 +171,7 @@ android {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation libs.androidx.material3.android
|
implementation libs.androidx.material3.android
|
||||||
|
implementation libs.androidx.material3
|
||||||
|
|
||||||
/** Desugaring for using VistaGuide **/
|
/** Desugaring for using VistaGuide **/
|
||||||
coreLibraryDesugaring libs.desugar.jdk.libs.nio
|
coreLibraryDesugaring libs.desugar.jdk.libs.nio
|
||||||
|
@ -179,7 +180,7 @@ dependencies {
|
||||||
def composeBom = libs.androidx.compose.bom
|
def composeBom = libs.androidx.compose.bom
|
||||||
implementation composeBom
|
implementation composeBom
|
||||||
androidTestImplementation composeBom
|
androidTestImplementation composeBom
|
||||||
implementation libs.androidx.material
|
// implementation libs.androidx.material
|
||||||
implementation libs.androidx.ui.tooling.preview
|
implementation libs.androidx.ui.tooling.preview
|
||||||
debugImplementation libs.androidx.ui.tooling
|
debugImplementation libs.androidx.ui.tooling
|
||||||
implementation libs.androidx.constraintlayout.compose
|
implementation libs.androidx.constraintlayout.compose
|
||||||
|
|
|
@ -17,7 +17,7 @@ import android.widget.ImageView
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
|
@ -18,7 +18,7 @@ import androidx.annotation.OptIn
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
@ -108,7 +108,7 @@ class ShareReceiverActivity : AppCompatActivity() {
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_video_mode_audio_only),
|
text = stringResource(R.string.pref_video_mode_audio_only),
|
||||||
style = MaterialTheme.typography.body1.merge(),
|
style = MaterialTheme.typography.bodyLarge.merge(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Button(onClick = {
|
Button(onClick = {
|
||||||
|
|
|
@ -9,13 +9,13 @@ import android.util.TypedValue
|
||||||
import androidx.annotation.AttrRes
|
import androidx.annotation.AttrRes
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material.Shapes
|
import androidx.compose.material3.Shapes
|
||||||
import androidx.compose.material.darkColors
|
import androidx.compose.material3.darkColorScheme
|
||||||
import androidx.compose.material.lightColors
|
import androidx.compose.material3.lightColorScheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
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.TextStyle
|
||||||
import androidx.compose.ui.text.font.FontFamily
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
@ -26,12 +26,12 @@ import androidx.core.content.ContextCompat
|
||||||
private val TAG = "AppTheme"
|
private val TAG = "AppTheme"
|
||||||
|
|
||||||
val Typography = Typography(
|
val Typography = Typography(
|
||||||
h1 = TextStyle(
|
displayLarge = TextStyle(
|
||||||
fontFamily = FontFamily.Default,
|
fontFamily = FontFamily.Default,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 30.sp
|
fontSize = 30.sp
|
||||||
),
|
),
|
||||||
body1 = TextStyle(
|
bodyLarge = TextStyle(
|
||||||
fontFamily = FontFamily.Default,
|
fontFamily = FontFamily.Default,
|
||||||
fontWeight = FontWeight.Normal,
|
fontWeight = FontWeight.Normal,
|
||||||
fontSize = 16.sp
|
fontSize = 16.sp
|
||||||
|
@ -65,10 +65,10 @@ fun getSecondaryColor(context: Context): Color {
|
||||||
return Color(getColorFromAttr(context, R.attr.colorSecondary))
|
return Color(getColorFromAttr(context, R.attr.colorSecondary))
|
||||||
}
|
}
|
||||||
|
|
||||||
val LightColors = lightColors(
|
val LightColors = lightColorScheme(
|
||||||
primary = Color(0xFF6200EE),
|
primary = Color(0xFF6200EE),
|
||||||
primaryVariant = Color(0xFF3700B3),
|
secondary = Color(0xFF3700B3),
|
||||||
secondary = Color(0xFF03DAC6),
|
tertiary = Color(0xFF03DAC6),
|
||||||
background = Color(0xFFFFFFFF),
|
background = Color(0xFFFFFFFF),
|
||||||
surface = Color(0xFFFFFFFF),
|
surface = Color(0xFFFFFFFF),
|
||||||
error = Color(0xFFB00020),
|
error = Color(0xFFB00020),
|
||||||
|
@ -79,10 +79,10 @@ val LightColors = lightColors(
|
||||||
onError = Color(0xFFFFFFFF)
|
onError = Color(0xFFFFFFFF)
|
||||||
)
|
)
|
||||||
|
|
||||||
val DarkColors = darkColors(
|
val DarkColors = darkColorScheme(
|
||||||
primary = Color(0xFFBB86FC),
|
primary = Color(0xFFBB86FC),
|
||||||
primaryVariant = Color(0xFF3700B3),
|
secondary = Color(0xFF3700B3),
|
||||||
secondary = Color(0xFF03DAC6),
|
tertiary = Color(0xFF03DAC6),
|
||||||
background = Color(0xFF121212),
|
background = Color(0xFF121212),
|
||||||
surface = Color(0xFF121212),
|
surface = Color(0xFF121212),
|
||||||
error = Color(0xFFCF6679),
|
error = Color(0xFFCF6679),
|
||||||
|
@ -119,7 +119,7 @@ fun CustomTheme(context: Context, content: @Composable () -> Unit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialTheme(
|
MaterialTheme(
|
||||||
colors = colors,
|
colorScheme = colors,
|
||||||
typography = Typography,
|
typography = Typography,
|
||||||
shapes = Shapes,
|
shapes = Shapes,
|
||||||
content = content
|
content = content
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package ac.mdiq.podcini.ui.compose
|
package ac.mdiq.podcini.ui.compose
|
||||||
|
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterialApi::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun Spinner(
|
fun Spinner(
|
||||||
items: List<String>,
|
items: List<String>,
|
||||||
|
@ -33,14 +33,12 @@ fun Spinner(
|
||||||
onDismissRequest = { expanded = false }
|
onDismissRequest = { expanded = false }
|
||||||
) {
|
) {
|
||||||
items.forEach { item ->
|
items.forEach { item ->
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(text = { Text(item) },
|
||||||
onClick = {
|
onClick = {
|
||||||
onItemSelected(item)
|
onItemSelected(item)
|
||||||
expanded = false
|
expanded = false
|
||||||
}
|
}
|
||||||
) {
|
)
|
||||||
Text(text = item)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,9 +33,9 @@ import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
import androidx.compose.material.*
|
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Edit
|
import androidx.compose.material.icons.filled.Edit
|
||||||
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.runtime.snapshots.SnapshotStateList
|
import androidx.compose.runtime.snapshots.SnapshotStateList
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
@ -64,14 +64,14 @@ import kotlin.math.roundToInt
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun InforBar(text: MutableState<String>, leftAction: MutableState<SwipeAction?>, rightAction: MutableState<SwipeAction?>, actionConfig: () -> Unit) {
|
fun InforBar(text: MutableState<String>, leftAction: MutableState<SwipeAction?>, rightAction: MutableState<SwipeAction?>, actionConfig: () -> Unit) {
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
Logd("InforBar", "textState: ${text.value}")
|
Logd("InforBar", "textState: ${text.value}")
|
||||||
Row {
|
Row {
|
||||||
Icon(painter = painterResource(leftAction.value?.getActionIcon() ?:R.drawable.ic_questionmark), tint = textColor, contentDescription = "left_action_icon",
|
Icon(painter = painterResource(leftAction.value?.getActionIcon() ?:R.drawable.ic_questionmark), tint = textColor, contentDescription = "left_action_icon",
|
||||||
modifier = Modifier.width(24.dp).height(24.dp).clickable(onClick = actionConfig))
|
modifier = Modifier.width(24.dp).height(24.dp).clickable(onClick = actionConfig))
|
||||||
Icon(painter = painterResource(R.drawable.baseline_arrow_left_alt_24), tint = textColor, contentDescription = "left_arrow", modifier = Modifier.width(24.dp).height(24.dp))
|
Icon(painter = painterResource(R.drawable.baseline_arrow_left_alt_24), tint = textColor, contentDescription = "left_arrow", modifier = Modifier.width(24.dp).height(24.dp))
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Text(text.value, color = textColor, style = MaterialTheme.typography.body2)
|
Text(text.value, color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Icon(painter = painterResource(R.drawable.baseline_arrow_right_alt_24), tint = textColor, contentDescription = "right_arrow", modifier = Modifier.width(24.dp).height(24.dp))
|
Icon(painter = painterResource(R.drawable.baseline_arrow_right_alt_24), tint = textColor, contentDescription = "right_arrow", modifier = Modifier.width(24.dp).height(24.dp))
|
||||||
Icon(painter = painterResource(rightAction.value?.getActionIcon() ?:R.drawable.ic_questionmark), tint = textColor, contentDescription = "right_action_icon",
|
Icon(painter = painterResource(rightAction.value?.getActionIcon() ?:R.drawable.ic_questionmark), tint = textColor, contentDescription = "right_action_icon",
|
||||||
|
@ -177,11 +177,11 @@ fun EpisodeSpeedDial(activity: MainActivity, selected: SnapshotStateList<Episode
|
||||||
val scrollState = rememberScrollState()
|
val scrollState = rememberScrollState()
|
||||||
Column(modifier = modifier.verticalScroll(scrollState), verticalArrangement = Arrangement.Bottom) {
|
Column(modifier = modifier.verticalScroll(scrollState), verticalArrangement = Arrangement.Bottom) {
|
||||||
if (isExpanded) options.forEachIndexed { _, button ->
|
if (isExpanded) options.forEachIndexed { _, button ->
|
||||||
FloatingActionButton(modifier = Modifier.padding(start = 4.dp, bottom = 6.dp).height(50.dp),
|
FloatingActionButton(modifier = Modifier.padding(start = 4.dp, bottom = 6.dp).height(40.dp),
|
||||||
backgroundColor = Color.LightGray,
|
containerColor = Color.LightGray,
|
||||||
onClick = {}) { button() }
|
onClick = {}) { button() }
|
||||||
}
|
}
|
||||||
FloatingActionButton(backgroundColor = Color.Green,
|
FloatingActionButton(containerColor = Color.Green,
|
||||||
onClick = { isExpanded = !isExpanded }) { Icon(Icons.Filled.Edit, "Edit") }
|
onClick = { isExpanded = !isExpanded }) { Icon(Icons.Filled.Edit, "Edit") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,6 @@ fun EpisodeSpeedDial(activity: MainActivity, selected: SnapshotStateList<Episode
|
||||||
fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episode>, leftSwipeCB: (Episode) -> Unit, rightSwipeCB: (Episode) -> Unit, actionButton_: ((Episode)->EpisodeActionButton)? = null) {
|
fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episode>, leftSwipeCB: (Episode) -> Unit, rightSwipeCB: (Episode) -> Unit, actionButton_: ((Episode)->EpisodeActionButton)? = null) {
|
||||||
val TAG = "EpisodeLazyColumn"
|
val TAG = "EpisodeLazyColumn"
|
||||||
var selectMode by remember { mutableStateOf(false) }
|
var selectMode by remember { mutableStateOf(false) }
|
||||||
// val selectedIds = remember { mutableSetOf<Long>() }
|
|
||||||
var selectedSize by remember { mutableStateOf(0) }
|
var selectedSize by remember { mutableStateOf(0) }
|
||||||
val selected = remember { mutableStateListOf<Episode>() }
|
val selected = remember { mutableStateListOf<Episode>() }
|
||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
|
@ -263,9 +262,7 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
val velocityTracker = remember { VelocityTracker() }
|
val velocityTracker = remember { VelocityTracker() }
|
||||||
val offsetX = remember { Animatable(0f) }
|
val offsetX = remember { Animatable(0f) }
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier.fillMaxWidth().pointerInput(Unit) {
|
||||||
.fillMaxWidth()
|
|
||||||
.pointerInput(Unit) {
|
|
||||||
detectHorizontalDragGestures(
|
detectHorizontalDragGestures(
|
||||||
onDragStart = { velocityTracker.resetTracking() },
|
onDragStart = { velocityTracker.resetTracking() },
|
||||||
onHorizontalDrag = { change, dragAmount ->
|
onHorizontalDrag = { change, dragAmount ->
|
||||||
|
@ -286,8 +283,7 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}.offset { IntOffset(offsetX.value.roundToInt(), 0) }
|
||||||
.offset { IntOffset(offsetX.value.roundToInt(), 0) }
|
|
||||||
) {
|
) {
|
||||||
var isSelected by remember { mutableStateOf(false) }
|
var isSelected by remember { mutableStateOf(false) }
|
||||||
LaunchedEffect(key1 = selectMode, key2 = selectedSize) {
|
LaunchedEffect(key1 = selectMode, key2 = selectedSize) {
|
||||||
|
@ -296,16 +292,11 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
}
|
}
|
||||||
fun toggleSelected() {
|
fun toggleSelected() {
|
||||||
isSelected = !isSelected
|
isSelected = !isSelected
|
||||||
if (isSelected) {
|
if (isSelected) selected.add(episodes[index])
|
||||||
// selectedIds.add(episode.id)
|
else selected.remove(episodes[index])
|
||||||
selected.add(episodes[index])
|
|
||||||
} else {
|
|
||||||
// selectedIds.remove(episode.id)
|
|
||||||
selected.remove(episodes[index])
|
|
||||||
}
|
}
|
||||||
}
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
Row (Modifier.background(if (isSelected) MaterialTheme.colorScheme.secondary else MaterialTheme.colorScheme.surface)) {
|
||||||
Row (Modifier.background(if (isSelected) MaterialTheme.colors.secondary else MaterialTheme.colors.surface)) {
|
|
||||||
if (false) {
|
if (false) {
|
||||||
val typedValue = TypedValue()
|
val typedValue = TypedValue()
|
||||||
LocalContext.current.theme.resolveAttribute(R.attr.dragview_background, typedValue, true)
|
LocalContext.current.theme.resolveAttribute(R.attr.dragview_background, typedValue, true)
|
||||||
|
@ -344,12 +335,9 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
selectMode = !selectMode
|
selectMode = !selectMode
|
||||||
isSelected = selectMode
|
isSelected = selectMode
|
||||||
if (selectMode) {
|
if (selectMode) {
|
||||||
// selectedIds.add(episode.id)
|
|
||||||
selected.add(episodes[index])
|
selected.add(episodes[index])
|
||||||
// selectedSize = selectedIds.size
|
|
||||||
longPressIndex = index
|
longPressIndex = index
|
||||||
} else {
|
} else {
|
||||||
// selectedIds.clear()
|
|
||||||
selectedSize = 0
|
selectedSize = 0
|
||||||
longPressIndex = -1
|
longPressIndex = -1
|
||||||
}
|
}
|
||||||
|
@ -363,7 +351,7 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
if (episode.inQueueState.value)
|
if (episode.inQueueState.value)
|
||||||
Icon(painter = painterResource(R.drawable.ic_playlist_play), tint = textColor, contentDescription = "ivInPlaylist", modifier = Modifier.width(14.dp).height(14.dp))
|
Icon(painter = painterResource(R.drawable.ic_playlist_play), tint = textColor, contentDescription = "ivInPlaylist", modifier = Modifier.width(14.dp).height(14.dp))
|
||||||
val dateSizeText = " · " + formatAbbrev(LocalContext.current, episode.getPubDate()) + " · " + if((episode.media?.size?:0) > 0) Formatter.formatShortFileSize(LocalContext.current, episode.media!!.size) else ""
|
val dateSizeText = " · " + formatAbbrev(LocalContext.current, episode.getPubDate()) + " · " + if((episode.media?.size?:0) > 0) Formatter.formatShortFileSize(LocalContext.current, episode.media!!.size) else ""
|
||||||
Text(dateSizeText, color = textColor, style = MaterialTheme.typography.body2)
|
Text(dateSizeText, color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
Text(episode.title?:"", color = textColor, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
Text(episode.title?:"", color = textColor, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||||
if (InTheatre.isCurMedia(episode.media) || inProgressState) {
|
if (InTheatre.isCurMedia(episode.media) || inProgressState) {
|
||||||
|
@ -371,13 +359,14 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
val dur = remember(episode, episode.media) { episode.media!!.getDuration()}
|
val dur = remember(episode, episode.media) { episode.media!!.getDuration()}
|
||||||
val prog = if (dur > 0 && pos >= 0 && dur >= pos) 1.0f * pos / dur else 0f
|
val prog = if (dur > 0 && pos >= 0 && dur >= pos) 1.0f * pos / dur else 0f
|
||||||
Row {
|
Row {
|
||||||
Text(DurationConverter.getDurationStringLong(pos), color = textColor, style = MaterialTheme.typography.caption)
|
Text(DurationConverter.getDurationStringLong(pos), color = textColor, style = MaterialTheme.typography.bodySmall)
|
||||||
LinearProgressIndicator(progress = prog, modifier = Modifier.weight(1f).height(4.dp).align(Alignment.CenterVertically))
|
LinearProgressIndicator(progress = prog, modifier = Modifier.weight(1f).height(4.dp).align(Alignment.CenterVertically))
|
||||||
Text(DurationConverter.getDurationStringLong(dur), color = textColor, style = MaterialTheme.typography.caption)
|
Text(DurationConverter.getDurationStringLong(dur), color = textColor, style = MaterialTheme.typography.bodySmall)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var actionButton by remember { mutableStateOf(if (actionButton_ == null) EpisodeActionButton.forItem(episodes[index]) else actionButton_(episodes[index])) }
|
var actionButton by remember { mutableStateOf(if (actionButton_ == null) EpisodeActionButton.forItem(episodes[index]) else actionButton_(episodes[index])) }
|
||||||
|
val actionRes by mutableIntStateOf(actionButton.getDrawable())
|
||||||
var showAltActionsDialog by remember { mutableStateOf(false) }
|
var showAltActionsDialog by remember { mutableStateOf(false) }
|
||||||
val dls = remember { DownloadServiceInterface.get() }
|
val dls = remember { DownloadServiceInterface.get() }
|
||||||
var dlPercent by remember { mutableIntStateOf(0) }
|
var dlPercent by remember { mutableIntStateOf(0) }
|
||||||
|
@ -400,7 +389,7 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
actionButton.onClick(activity)
|
actionButton.onClick(activity)
|
||||||
})
|
})
|
||||||
}, contentAlignment = Alignment.Center) {
|
}, contentAlignment = Alignment.Center) {
|
||||||
Icon(painter = painterResource(actionButton.getDrawable()), tint = textColor, contentDescription = null, modifier = Modifier.width(28.dp).height(32.dp))
|
Icon(painter = painterResource(actionRes), tint = textColor, contentDescription = null, modifier = Modifier.width(28.dp).height(32.dp))
|
||||||
if (isDownloading() && dlPercent >= 0) CircularProgressIndicator(progress = 0.01f * dlPercent, strokeWidth = 4.dp, color = textColor)
|
if (isDownloading() && dlPercent >= 0) CircularProgressIndicator(progress = 0.01f * dlPercent, strokeWidth = 4.dp, color = textColor)
|
||||||
}
|
}
|
||||||
if (showAltActionsDialog) actionButton.AltActionsDialog(activity, showAltActionsDialog, onDismiss = { showAltActionsDialog = false })
|
if (showAltActionsDialog) actionButton.AltActionsDialog(activity, showAltActionsDialog, onDismiss = { showAltActionsDialog = false })
|
||||||
|
@ -412,10 +401,8 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
Row(modifier = Modifier.align(Alignment.TopEnd).width(150.dp).height(45.dp).background(Color.LightGray), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically) {
|
Row(modifier = Modifier.align(Alignment.TopEnd).width(150.dp).height(45.dp).background(Color.LightGray), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically) {
|
||||||
Icon(painter = painterResource(R.drawable.baseline_arrow_upward_24), tint = Color.Black, contentDescription = null, modifier = Modifier.width(35.dp).height(35.dp).padding(end = 10.dp)
|
Icon(painter = painterResource(R.drawable.baseline_arrow_upward_24), tint = Color.Black, contentDescription = null, modifier = Modifier.width(35.dp).height(35.dp).padding(end = 10.dp)
|
||||||
.clickable(onClick = {
|
.clickable(onClick = {
|
||||||
// selectedIds.clear()
|
|
||||||
selected.clear()
|
selected.clear()
|
||||||
for (i in 0..longPressIndex) {
|
for (i in 0..longPressIndex) {
|
||||||
// selectedIds.add(episodes[i].id)
|
|
||||||
selected.add(episodes[i])
|
selected.add(episodes[i])
|
||||||
}
|
}
|
||||||
selectedSize = selected.size
|
selectedSize = selected.size
|
||||||
|
@ -423,10 +410,8 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
}))
|
}))
|
||||||
Icon(painter = painterResource(R.drawable.baseline_arrow_downward_24), tint = Color.Black, contentDescription = null, modifier = Modifier.width(35.dp).height(35.dp).padding(end = 10.dp)
|
Icon(painter = painterResource(R.drawable.baseline_arrow_downward_24), tint = Color.Black, contentDescription = null, modifier = Modifier.width(35.dp).height(35.dp).padding(end = 10.dp)
|
||||||
.clickable(onClick = {
|
.clickable(onClick = {
|
||||||
// selectedIds.clear()
|
|
||||||
selected.clear()
|
selected.clear()
|
||||||
for (i in longPressIndex..episodes.size-1) {
|
for (i in longPressIndex..episodes.size-1) {
|
||||||
// selectedIds.add(episodes[i].id)
|
|
||||||
selected.add(episodes[i])
|
selected.add(episodes[i])
|
||||||
}
|
}
|
||||||
selectedSize = selected.size
|
selectedSize = selected.size
|
||||||
|
@ -437,12 +422,10 @@ fun EpisodeLazyColumn(activity: MainActivity, episodes: SnapshotStateList<Episod
|
||||||
.clickable(onClick = {
|
.clickable(onClick = {
|
||||||
if (selectedSize != episodes.size) {
|
if (selectedSize != episodes.size) {
|
||||||
for (e in episodes) {
|
for (e in episodes) {
|
||||||
// selectedIds.add(e.id)
|
|
||||||
selected.add(e)
|
selected.add(e)
|
||||||
}
|
}
|
||||||
selectAllRes = R.drawable.ic_select_none
|
selectAllRes = R.drawable.ic_select_none
|
||||||
} else {
|
} else {
|
||||||
// selectedIds.clear()
|
|
||||||
selected.clear()
|
selected.clear()
|
||||||
selectAllRes = R.drawable.ic_select_all
|
selectAllRes = R.drawable.ic_select_all
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ import ac.mdiq.podcini.ui.utils.TransitionEffect
|
||||||
import ac.mdiq.podcini.util.Logd
|
import ac.mdiq.podcini.util.Logd
|
||||||
import androidx.compose.foundation.*
|
import androidx.compose.foundation.*
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
@ -27,7 +27,7 @@ import coil.compose.AsyncImage
|
||||||
@Composable
|
@Composable
|
||||||
fun FeedEpisodesHeader(activity: MainActivity, feed: Feed?, filterButColor: Color, filterClickCB: ()->Unit, filterLongClickCB: ()->Unit) {
|
fun FeedEpisodesHeader(activity: MainActivity, feed: Feed?, filterButColor: Color, filterClickCB: ()->Unit, filterLongClickCB: ()->Unit) {
|
||||||
val TAG = "FeedEpisodesHeader"
|
val TAG = "FeedEpisodesHeader"
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
ConstraintLayout(modifier = Modifier.fillMaxWidth().height(120.dp)) {
|
ConstraintLayout(modifier = Modifier.fillMaxWidth().height(120.dp)) {
|
||||||
val (controlRow, image1, image2, imgvCover, taColumn) = createRefs()
|
val (controlRow, image1, image2, imgvCover, taColumn) = createRefs()
|
||||||
Row(Modifier.fillMaxWidth().padding(horizontal = 8.dp, vertical = 2.dp).background(colorResource(id = R.color.image_readability_tint))
|
Row(Modifier.fillMaxWidth().padding(horizontal = 8.dp, vertical = 2.dp).background(colorResource(id = R.color.image_readability_tint))
|
||||||
|
@ -47,7 +47,7 @@ fun FeedEpisodesHeader(activity: MainActivity, feed: Feed?, filterButColor: Colo
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Text(feed?.episodes?.size?.toString()?:"", textAlign = TextAlign.Center, color = Color.White, style = MaterialTheme.typography.body1)
|
Text(feed?.episodes?.size?.toString()?:"", textAlign = TextAlign.Center, color = Color.White, style = MaterialTheme.typography.bodyLarge)
|
||||||
}
|
}
|
||||||
Image(painter = painterResource(R.drawable.ic_rounded_corner_left), contentDescription = "left_corner",
|
Image(painter = painterResource(R.drawable.ic_rounded_corner_left), contentDescription = "left_corner",
|
||||||
Modifier.width(12.dp).height(12.dp).constrainAs(image1) {
|
Modifier.width(12.dp).height(12.dp).constrainAs(image1) {
|
||||||
|
@ -69,8 +69,8 @@ fun FeedEpisodesHeader(activity: MainActivity, feed: Feed?, filterButColor: Colo
|
||||||
Column(Modifier.constrainAs(taColumn) {
|
Column(Modifier.constrainAs(taColumn) {
|
||||||
top.linkTo(imgvCover.top)
|
top.linkTo(imgvCover.top)
|
||||||
start.linkTo(imgvCover.end) }) {
|
start.linkTo(imgvCover.end) }) {
|
||||||
Text(feed?.title?:"", color = textColor, style = MaterialTheme.typography.body1, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
Text(feed?.title?:"", color = textColor, style = MaterialTheme.typography.bodyLarge, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||||
Text(feed?.author?:"", color = textColor, style = MaterialTheme.typography.body2, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
Text(feed?.author?:"", color = textColor, style = MaterialTheme.typography.bodyMedium, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -57,10 +57,10 @@ import android.widget.Toast
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.compose.foundation.*
|
import androidx.compose.foundation.*
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.material.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material.Slider
|
import androidx.compose.material3.Slider
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
@ -199,8 +199,8 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
@Composable
|
@Composable
|
||||||
fun PlayerUI() {
|
fun PlayerUI() {
|
||||||
Column(modifier = Modifier.fillMaxWidth().height(133.dp)) {
|
Column(modifier = Modifier.fillMaxWidth().height(133.dp)) {
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
Text(titleText, maxLines = 1, color = textColor, style = MaterialTheme.typography.body2)
|
Text(titleText, maxLines = 1, color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
var tempSliderValue by remember { mutableStateOf(sliderValue) }
|
var tempSliderValue by remember { mutableStateOf(sliderValue) }
|
||||||
Slider(value = tempSliderValue, valueRange = 0f..duration.toFloat(), modifier = Modifier.height(15.dp),
|
Slider(value = tempSliderValue, valueRange = 0f..duration.toFloat(), modifier = Modifier.height(15.dp),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
|
@ -213,10 +213,10 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
if (playbackService?.isServiceReady() == true) seekTo(currentPosition)
|
if (playbackService?.isServiceReady() == true) seekTo(currentPosition)
|
||||||
})
|
})
|
||||||
Row {
|
Row {
|
||||||
Text(DurationConverter.getDurationStringLong(currentPosition), color = textColor, style = MaterialTheme.typography.body2)
|
Text(DurationConverter.getDurationStringLong(currentPosition), color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
Spacer(Modifier.weight(1f))
|
Spacer(Modifier.weight(1f))
|
||||||
showTimeLeft = UserPreferences.shouldShowRemainingTime()
|
showTimeLeft = UserPreferences.shouldShowRemainingTime()
|
||||||
Text(txtvLengtTexth, color = textColor, style = MaterialTheme.typography.body2, modifier = Modifier.clickable {
|
Text(txtvLengtTexth, color = textColor, style = MaterialTheme.typography.bodyMedium, modifier = Modifier.clickable {
|
||||||
if (controller == null) return@clickable
|
if (controller == null) return@clickable
|
||||||
showTimeLeft = !showTimeLeft
|
showTimeLeft = !showTimeLeft
|
||||||
UserPreferences.setShowRemainTimeSetting(showTimeLeft)
|
UserPreferences.setShowRemainTimeSetting(showTimeLeft)
|
||||||
|
@ -255,7 +255,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
modifier = Modifier.width(48.dp).height(48.dp).clickable(onClick = {
|
modifier = Modifier.width(48.dp).height(48.dp).clickable(onClick = {
|
||||||
VariableSpeedDialog.newInstance(booleanArrayOf(true, true, true), null)?.show(childFragmentManager, null)
|
VariableSpeedDialog.newInstance(booleanArrayOf(true, true, true), null)?.show(childFragmentManager, null)
|
||||||
}))
|
}))
|
||||||
Text(txtvPlaybackSpeed, color = textColor, style = MaterialTheme.typography.body2)
|
Text(txtvPlaybackSpeed, color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
Spacer(Modifier.weight(0.1f))
|
Spacer(Modifier.weight(0.1f))
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
|
@ -268,7 +268,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}, onLongClick = {
|
}, onLongClick = {
|
||||||
SkipPreferenceDialog.showSkipPreference(requireContext(), SkipPreferenceDialog.SkipDirection.SKIP_REWIND)
|
SkipPreferenceDialog.showSkipPreference(requireContext(), SkipPreferenceDialog.SkipDirection.SKIP_REWIND)
|
||||||
}))
|
}))
|
||||||
Text(NumberFormat.getInstance().format(UserPreferences.rewindSecs.toLong()), color = textColor, style = MaterialTheme.typography.body2)
|
Text(NumberFormat.getInstance().format(UserPreferences.rewindSecs.toLong()), color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
Spacer(Modifier.weight(0.1f))
|
Spacer(Modifier.weight(0.1f))
|
||||||
Icon(painter = painterResource(playButRes), tint = textColor,
|
Icon(painter = painterResource(playButRes), tint = textColor,
|
||||||
|
@ -301,7 +301,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}, onLongClick = {
|
}, onLongClick = {
|
||||||
SkipPreferenceDialog.showSkipPreference(requireContext(), SkipPreferenceDialog.SkipDirection.SKIP_FORWARD)
|
SkipPreferenceDialog.showSkipPreference(requireContext(), SkipPreferenceDialog.SkipDirection.SKIP_FORWARD)
|
||||||
}))
|
}))
|
||||||
Text(NumberFormat.getInstance().format(UserPreferences.fastForwardSecs.toLong()), color = textColor, style = MaterialTheme.typography.body2)
|
Text(NumberFormat.getInstance().format(UserPreferences.fastForwardSecs.toLong()), color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
Spacer(Modifier.weight(0.1f))
|
Spacer(Modifier.weight(0.1f))
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
|
@ -323,7 +323,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}, onLongClick = {
|
}, onLongClick = {
|
||||||
activity?.sendBroadcast(MediaButtonReceiver.createIntent(requireContext(), KeyEvent.KEYCODE_MEDIA_NEXT))
|
activity?.sendBroadcast(MediaButtonReceiver.createIntent(requireContext(), KeyEvent.KEYCODE_MEDIA_NEXT))
|
||||||
}))
|
}))
|
||||||
if (UserPreferences.speedforwardSpeed > 0.1f) Text(NumberFormat.getInstance().format(UserPreferences.speedforwardSpeed), color = textColor, style = MaterialTheme.typography.body2)
|
if (UserPreferences.speedforwardSpeed > 0.1f) Text(NumberFormat.getInstance().format(UserPreferences.speedforwardSpeed), color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
Spacer(Modifier.weight(0.1f))
|
Spacer(Modifier.weight(0.1f))
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
fun DetailUI() {
|
fun DetailUI() {
|
||||||
val scrollState = rememberScrollState()
|
val scrollState = rememberScrollState()
|
||||||
Column(modifier = Modifier.fillMaxWidth().verticalScroll(scrollState)) {
|
Column(modifier = Modifier.fillMaxWidth().verticalScroll(scrollState)) {
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
fun copyText(text: String): Boolean {
|
fun copyText(text: String): Boolean {
|
||||||
val clipboardManager: ClipboardManager? = ContextCompat.getSystemService(requireContext(), ClipboardManager::class.java)
|
val clipboardManager: ClipboardManager? = ContextCompat.getSystemService(requireContext(), ClipboardManager::class.java)
|
||||||
clipboardManager?.setPrimaryClip(ClipData.newPlainText("Podcini", text))
|
clipboardManager?.setPrimaryClip(ClipData.newPlainText("Podcini", text))
|
||||||
|
@ -344,7 +344,7 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
Text(txtvPodcastTitle, textAlign = TextAlign.Center, color = textColor, style = MaterialTheme.typography.h5,
|
Text(txtvPodcastTitle, textAlign = TextAlign.Center, color = textColor, style = MaterialTheme.typography.headlineSmall,
|
||||||
modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 5.dp).combinedClickable(onClick = {
|
modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 5.dp).combinedClickable(onClick = {
|
||||||
if (currentMedia is EpisodeMedia) {
|
if (currentMedia is EpisodeMedia) {
|
||||||
if (currentItem?.feedId != null) {
|
if (currentItem?.feedId != null) {
|
||||||
|
@ -353,8 +353,8 @@ class AudioPlayerFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, onLongClick = { copyText(currentMedia?.getFeedTitle()?:"") }))
|
}, onLongClick = { copyText(currentMedia?.getFeedTitle()?:"") }))
|
||||||
Text(episodeDate, textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 2.dp), color = textColor, style = MaterialTheme.typography.body2)
|
Text(episodeDate, textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 2.dp), color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
Text(titleText, textAlign = TextAlign.Center, color = textColor, style = MaterialTheme.typography.h6, modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 5.dp)
|
Text(titleText, textAlign = TextAlign.Center, color = textColor, style = MaterialTheme.typography.titleLarge, modifier = Modifier.fillMaxWidth().padding(top = 2.dp, bottom = 5.dp)
|
||||||
.combinedClickable(onClick = {}, onLongClick = { copyText(currentItem?.title?:"") }))
|
.combinedClickable(onClick = {}, onLongClick = { copyText(currentItem?.title?:"") }))
|
||||||
fun restoreFromPreference(): Boolean {
|
fun restoreFromPreference(): Boolean {
|
||||||
if ((activity as MainActivity).bottomSheet.state != BottomSheetBehavior.STATE_EXPANDED) return false
|
if ((activity as MainActivity).bottomSheet.state != BottomSheetBehavior.STATE_EXPANDED) return false
|
||||||
|
|
|
@ -50,9 +50,9 @@ import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
@ -188,14 +188,14 @@ class EpisodeInfoFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
@Composable
|
@Composable
|
||||||
fun InfoView() {
|
fun InfoView() {
|
||||||
Column {
|
Column {
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
Row(modifier = Modifier.padding(start = 16.dp, end = 16.dp), verticalAlignment = Alignment.CenterVertically) {
|
Row(modifier = Modifier.padding(start = 16.dp, end = 16.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||||
val imgLoc = if (episode != null) ImageResourceUtils.getEpisodeListImageLocation(episode!!) else null
|
val imgLoc = if (episode != null) ImageResourceUtils.getEpisodeListImageLocation(episode!!) else null
|
||||||
AsyncImage(model = imgLoc, contentDescription = "imgvCover", Modifier.width(56.dp).height(56.dp).clickable(onClick = { openPodcast() }))
|
AsyncImage(model = imgLoc, contentDescription = "imgvCover", Modifier.width(56.dp).height(56.dp).clickable(onClick = { openPodcast() }))
|
||||||
Column(modifier = Modifier.padding(start = 10.dp)) {
|
Column(modifier = Modifier.padding(start = 10.dp)) {
|
||||||
Text(txtvPodcast, color = textColor, style = MaterialTheme.typography.body1, modifier = Modifier.clickable { openPodcast() })
|
Text(txtvPodcast, color = textColor, style = MaterialTheme.typography.bodyLarge, modifier = Modifier.clickable { openPodcast() })
|
||||||
Text(txtvTitle, color = textColor, style = MaterialTheme.typography.body1.copy(fontWeight = FontWeight.Bold), maxLines = 5, overflow = TextOverflow.Ellipsis)
|
Text(txtvTitle, color = textColor, style = MaterialTheme.typography.bodyLarge.copy(fontWeight = FontWeight.Bold), maxLines = 5, overflow = TextOverflow.Ellipsis)
|
||||||
Text(txtvPublished + " · " + txtvDuration + " · " + txtvSize, color = textColor, style = MaterialTheme.typography.body2)
|
Text(txtvPublished + " · " + txtvDuration + " · " + txtvSize, color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
|
@ -237,7 +237,7 @@ class EpisodeInfoFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
}
|
}
|
||||||
if (!hasMedia) Text("noMediaLabel", color = textColor, style = MaterialTheme.typography.body2)
|
if (!hasMedia) Text("noMediaLabel", color = textColor, style = MaterialTheme.typography.bodyMedium)
|
||||||
val scrollState = rememberScrollState()
|
val scrollState = rememberScrollState()
|
||||||
Column(modifier = Modifier.fillMaxWidth().verticalScroll(scrollState)) {
|
Column(modifier = Modifier.fillMaxWidth().verticalScroll(scrollState)) {
|
||||||
AndroidView(modifier = Modifier.fillMaxSize(), factory = { context ->
|
AndroidView(modifier = Modifier.fillMaxSize(), factory = { context ->
|
||||||
|
@ -251,7 +251,7 @@ class EpisodeInfoFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
}, update = {
|
}, update = {
|
||||||
it.loadDataWithBaseURL("https://127.0.0.1", webviewData, "text/html", "utf-8", "about:blank")
|
it.loadDataWithBaseURL("https://127.0.0.1", webviewData, "text/html", "utf-8", "about:blank")
|
||||||
})
|
})
|
||||||
Text(itemLink, color = textColor, style = MaterialTheme.typography.caption)
|
Text(itemLink, color = textColor, style = MaterialTheme.typography.bodySmall)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ import ac.mdiq.podcini.storage.database.Feeds.persistFeedPreferences
|
||||||
import ac.mdiq.podcini.storage.database.RealmDB.realm
|
import ac.mdiq.podcini.storage.database.RealmDB.realm
|
||||||
import ac.mdiq.podcini.storage.database.RealmDB.upsertBlk
|
import ac.mdiq.podcini.storage.database.RealmDB.upsertBlk
|
||||||
import ac.mdiq.podcini.storage.model.*
|
import ac.mdiq.podcini.storage.model.*
|
||||||
import ac.mdiq.podcini.storage.model.FeedPreferences.*
|
import ac.mdiq.podcini.storage.model.FeedPreferences.AutoDeleteAction
|
||||||
|
import ac.mdiq.podcini.storage.model.FeedPreferences.AutoDownloadPolicy
|
||||||
import ac.mdiq.podcini.storage.model.FeedPreferences.Companion.FeedAutoDeleteOptions
|
import ac.mdiq.podcini.storage.model.FeedPreferences.Companion.FeedAutoDeleteOptions
|
||||||
import ac.mdiq.podcini.ui.adapter.SimpleChipAdapter
|
import ac.mdiq.podcini.ui.adapter.SimpleChipAdapter
|
||||||
import ac.mdiq.podcini.ui.compose.CustomTheme
|
import ac.mdiq.podcini.ui.compose.CustomTheme
|
||||||
|
@ -37,7 +38,7 @@ import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.foundation.text.KeyboardOptions
|
import androidx.compose.foundation.text.KeyboardOptions
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
@ -45,11 +46,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
import androidx.compose.ui.platform.ComposeView
|
import androidx.compose.ui.platform.ComposeView
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.res.vectorResource
|
import androidx.compose.ui.res.vectorResource
|
||||||
import androidx.compose.ui.text.AnnotatedString
|
|
||||||
import androidx.compose.ui.text.input.KeyboardType
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.text.input.OffsetMapping
|
|
||||||
import androidx.compose.ui.text.input.TransformedText
|
|
||||||
import androidx.compose.ui.text.input.VisualTransformation
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
@ -95,7 +92,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
|
|
||||||
binding.composeView.setContent {
|
binding.composeView.setContent {
|
||||||
CustomTheme(requireContext()) {
|
CustomTheme(requireContext()) {
|
||||||
val textColor = MaterialTheme.colors.onSurface
|
val textColor = MaterialTheme.colorScheme.onSurface
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(start = 20.dp, end = 16.dp, top = 10.dp, bottom = 10.dp),
|
modifier = Modifier.padding(start = 20.dp, end = 16.dp, top = 10.dp, bottom = 10.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
|
@ -108,7 +105,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.keep_updated),
|
text = stringResource(R.string.keep_updated),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
@ -126,7 +123,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.keep_updated_summary),
|
text = stringResource(R.string.keep_updated_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -139,7 +136,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_video_mode_label),
|
text = stringResource(R.string.feed_video_mode_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -156,7 +153,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(videoModeSummaryResId),
|
text = stringResource(videoModeSummaryResId),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -169,7 +166,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_stream_over_download_title),
|
text = stringResource(R.string.pref_stream_over_download_title),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
@ -189,7 +186,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_stream_over_download_sum),
|
text = stringResource(R.string.pref_stream_over_download_sum),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -202,7 +199,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_feed_associated_queue),
|
text = stringResource(R.string.pref_feed_associated_queue),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val selectedOption = feed?.preferences?.queueText ?: "Default"
|
val selectedOption = feed?.preferences?.queueText ?: "Default"
|
||||||
|
@ -220,7 +217,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = curPrefQueue + " : " + stringResource(R.string.pref_feed_associated_queue_sum),
|
text = curPrefQueue + " : " + stringResource(R.string.pref_feed_associated_queue_sum),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -234,7 +231,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.audo_add_new_queue),
|
text = stringResource(R.string.audo_add_new_queue),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
@ -252,7 +249,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.audo_add_new_queue_summary),
|
text = stringResource(R.string.audo_add_new_queue_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -265,7 +262,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.auto_delete_label),
|
text = stringResource(R.string.auto_delete_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -282,7 +279,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(autoDeleteSummaryResId),
|
text = stringResource(autoDeleteSummaryResId),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -294,7 +291,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_tags_label),
|
text = stringResource(R.string.feed_tags_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val dialog = TagSettingsDialog.newInstance(listOf(feed!!))
|
val dialog = TagSettingsDialog.newInstance(listOf(feed!!))
|
||||||
|
@ -304,7 +301,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_tags_summary),
|
text = stringResource(R.string.feed_tags_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -315,7 +312,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.playback_speed),
|
text = stringResource(R.string.playback_speed),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
PlaybackSpeedDialog().show()
|
PlaybackSpeedDialog().show()
|
||||||
|
@ -324,7 +321,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_feed_playback_speed_sum),
|
text = stringResource(R.string.pref_feed_playback_speed_sum),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -335,7 +332,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_feed_skip),
|
text = stringResource(R.string.pref_feed_skip),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -352,7 +349,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_feed_skip_sum),
|
text = stringResource(R.string.pref_feed_skip_sum),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -363,7 +360,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_volume_adapdation),
|
text = stringResource(R.string.feed_volume_adapdation),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -380,7 +377,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_volume_adaptation_summary),
|
text = stringResource(R.string.feed_volume_adaptation_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -392,7 +389,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Spacer(modifier = Modifier.width(20.dp))
|
Spacer(modifier = Modifier.width(20.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.authentication_label),
|
text = stringResource(R.string.authentication_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -410,7 +407,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.authentication_descr),
|
text = stringResource(R.string.authentication_descr),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -422,7 +419,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.auto_download_label),
|
text = stringResource(R.string.auto_download_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
@ -438,7 +435,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
if (!isEnableAutodownload) {
|
if (!isEnableAutodownload) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.auto_download_disabled_globally),
|
text = stringResource(R.string.auto_download_disabled_globally),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -449,7 +446,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.feed_auto_download_policy),
|
text = stringResource(R.string.feed_auto_download_policy),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -471,7 +468,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_episode_cache_title),
|
text = stringResource(R.string.pref_episode_cache_title),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
val composeView = ComposeView(requireContext()).apply {
|
val composeView = ComposeView(requireContext()).apply {
|
||||||
|
@ -489,7 +486,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_episode_cache_summary),
|
text = stringResource(R.string.pref_episode_cache_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -498,7 +495,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_auto_download_counting_played_title),
|
text = stringResource(R.string.pref_auto_download_counting_played_title),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
@ -518,7 +515,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.pref_auto_download_counting_played_summary),
|
text = stringResource(R.string.pref_auto_download_counting_played_summary),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -527,7 +524,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.episode_inclusive_filters_label),
|
text = stringResource(R.string.episode_inclusive_filters_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
object : AutoDownloadFilterPrefDialog(requireContext(),
|
object : AutoDownloadFilterPrefDialog(requireContext(),
|
||||||
|
@ -545,7 +542,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.episode_filters_description),
|
text = stringResource(R.string.episode_filters_description),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -554,7 +551,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
Row(Modifier.fillMaxWidth()) {
|
Row(Modifier.fillMaxWidth()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.episode_exclusive_filters_label),
|
text = stringResource(R.string.episode_exclusive_filters_label),
|
||||||
style = MaterialTheme.typography.h6,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
modifier = Modifier.clickable(onClick = {
|
modifier = Modifier.clickable(onClick = {
|
||||||
object : AutoDownloadFilterPrefDialog(requireContext(),
|
object : AutoDownloadFilterPrefDialog(requireContext(),
|
||||||
|
@ -572,7 +569,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.episode_filters_description),
|
text = stringResource(R.string.episode_filters_description),
|
||||||
style = MaterialTheme.typography.body2,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
color = textColor
|
color = textColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -657,7 +654,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
style = MaterialTheme.typography.body1.merge(),
|
style = MaterialTheme.typography.bodyLarge.merge(),
|
||||||
// color = textColor,
|
// color = textColor,
|
||||||
modifier = Modifier.padding(start = 16.dp)
|
modifier = Modifier.padding(start = 16.dp)
|
||||||
)
|
)
|
||||||
|
@ -727,7 +724,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
style = MaterialTheme.typography.body1.merge(),
|
style = MaterialTheme.typography.bodyLarge.merge(),
|
||||||
// color = textColor,
|
// color = textColor,
|
||||||
modifier = Modifier.padding(start = 16.dp)
|
modifier = Modifier.padding(start = 16.dp)
|
||||||
)
|
)
|
||||||
|
@ -774,7 +771,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(item.resId),
|
text = stringResource(item.resId),
|
||||||
style = MaterialTheme.typography.body1.merge(),
|
style = MaterialTheme.typography.bodyLarge.merge(),
|
||||||
// color = textColor,
|
// color = textColor,
|
||||||
modifier = Modifier.padding(start = 16.dp)
|
modifier = Modifier.padding(start = 16.dp)
|
||||||
)
|
)
|
||||||
|
@ -822,7 +819,7 @@ class FeedSettingsFragment : Fragment() {
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(item.resId),
|
text = stringResource(item.resId),
|
||||||
style = MaterialTheme.typography.body1.merge(),
|
style = MaterialTheme.typography.bodyLarge.merge(),
|
||||||
// color = textColor,
|
// color = textColor,
|
||||||
modifier = Modifier.padding(start = 16.dp)
|
modifier = Modifier.padding(start = 16.dp)
|
||||||
)
|
)
|
||||||
|
|
|
@ -55,10 +55,10 @@ import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.wrapContentSize
|
import androidx.compose.foundation.layout.wrapContentSize
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material.TextField
|
import androidx.compose.material3.TextField
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,7 +32,4 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<!-- <include-->
|
|
||||||
<!-- layout="@layout/multi_select_speed_dial" />-->
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/subscription_fragment"
|
android:id="@+id/subscription_fragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
|
@ -21,52 +22,11 @@
|
||||||
app:navigationContentDescription="@string/toolbar_back_button_content_description"
|
app:navigationContentDescription="@string/toolbar_back_button_content_description"
|
||||||
app:navigationIcon="?homeAsUpIndicator" />
|
app:navigationIcon="?homeAsUpIndicator" />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.compose.ui.platform.ComposeView
|
||||||
android:id="@+id/feeds_info_layout"
|
android:id="@+id/infobar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"/>
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:paddingEnd="20dp"
|
|
||||||
android:paddingVertical="4dp"
|
|
||||||
android:layout_marginTop="-12dp"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/ic_info" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<com.mikepenz.iconics.view.IconicsTextView
|
|
||||||
android:id="@+id/txtvInformation"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="2dp"
|
|
||||||
android:background="?android:attr/colorBackground"
|
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="?attr/colorAccent"
|
|
||||||
tools:visibility="visible"
|
|
||||||
tools:text="(i) Information" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/count"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:text="12 Podcasts" />
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -79,19 +39,7 @@
|
||||||
android:layout_marginTop="-12dp"
|
android:layout_marginTop="-12dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
android:layout_below="@id/appbar">
|
|
||||||
|
|
||||||
<!-- <com.google.android.material.textfield.TextInputEditText-->
|
|
||||||
<!-- android:id="@+id/search_box"-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_weight="1"-->
|
|
||||||
<!-- android:inputType="text"-->
|
|
||||||
<!-- android:hint="@string/feed_search_hint_text"-->
|
|
||||||
<!-- android:lines="1"-->
|
|
||||||
<!-- android:imeOptions="actionSearch"-->
|
|
||||||
<!-- android:background="?attr/background_color"/>-->
|
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:id="@+id/queues_spinner"
|
android:id="@+id/queues_spinner"
|
||||||
|
@ -118,44 +66,9 @@
|
||||||
android:spinnerMode="dropdown"/>
|
android:spinnerMode="dropdown"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
<androidx.compose.ui.platform.ComposeView
|
||||||
android:id="@+id/swipeRefresh"
|
android:id="@+id/lazyColumn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"/>
|
||||||
android:layout_below="@id/selection_block">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
</LinearLayout>
|
||||||
android:id="@+id/subscriptions_grid"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:paddingBottom="88dp"
|
|
||||||
tools:itemCount="2"
|
|
||||||
tools:listitem="@layout/subscription_item" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
||||||
|
|
||||||
<!-- <ProgressBar-->
|
|
||||||
<!-- android:id="@+id/progressBar"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_centerInParent="true"-->
|
|
||||||
<!-- android:indeterminateOnly="true"-->
|
|
||||||
<!-- android:visibility="visible" />-->
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
||||||
android:id="@+id/subscriptions_add"
|
|
||||||
android:layout_width="56dp"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:contentDescription="@string/add_feed_label"
|
|
||||||
app:srcCompat="@drawable/ic_add" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/multi_select_speed_dial" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
|
@ -1,114 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:squareImageView="http://schemas.android.com/apk/ac.mdiq.podcini"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:id="@+id/subscription_item"
|
|
||||||
tools:layout_width="400dp">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:id="@+id/outerContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clickable="false"
|
|
||||||
android:foreground="?attr/selectableItemBackground"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ac.mdiq.podcini.ui.view.SquareImageView
|
|
||||||
android:id="@+id/coverImage"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:outlineProvider="background"
|
|
||||||
squareImageView:direction="width"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/info_card"
|
|
||||||
android:layout_width="0.dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/titleLabel"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:lines="1"
|
|
||||||
android:text="Title" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/producerLabel"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:lines="1"
|
|
||||||
android:text="Author" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/episodeCount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:text="0 episodes" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/sortInfo"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:text="info" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/errorIcon"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:contentDescription="@string/refresh_failed_msg"
|
|
||||||
app:srcCompat="@drawable/ic_error"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/selectContainer"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clickable="false">
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/selectCheckBox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:minWidth="0dp"
|
|
||||||
android:minHeight="0dp"
|
|
||||||
android:layout_margin="8dp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
|
@ -1,125 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:squareImageView="http://schemas.android.com/apk/ac.mdiq.podcini"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:id="@+id/subscription_item_brief"
|
|
||||||
tools:layout_width="150dp">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:id="@+id/outerContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clickable="false"
|
|
||||||
android:foreground="?attr/selectableItemBackground"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="1px"
|
|
||||||
android:clickable="false"
|
|
||||||
app:cardBackgroundColor="@color/non_square_icon_background"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<ac.mdiq.podcini.ui.view.SquareImageView
|
|
||||||
android:id="@+id/coverImage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:outlineProvider="background"
|
|
||||||
squareImageView:direction="width"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/fallbackTitleLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@+id/coverImage"
|
|
||||||
android:layout_alignLeft="@+id/coverImage"
|
|
||||||
android:layout_alignTop="@+id/coverImage"
|
|
||||||
android:layout_alignEnd="@+id/coverImage"
|
|
||||||
android:layout_alignRight="@+id/coverImage"
|
|
||||||
android:layout_alignBottom="@+id/coverImage"
|
|
||||||
android:background="@color/feed_text_bg"
|
|
||||||
android:gravity="center"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:padding="6dp"
|
|
||||||
android:textColor="#fff"
|
|
||||||
tools:text="@sample/episodes.json/data/title" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/episodeCount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="3"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:textSize="14sp"
|
|
||||||
style="@style/TextPill"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginBottom="8dp"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/errorIcon"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignBottom="@id/coverImage"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:contentDescription="@string/refresh_failed_msg"
|
|
||||||
app:srcCompat="@drawable/ic_error"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/titleLabel"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:lines="2"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
tools:text="@sample/episodes.json/data/title" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/selectContainer"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clickable="false">
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/selectCheckBox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:minWidth="0dp"
|
|
||||||
android:minHeight="0dp"
|
|
||||||
android:layout_margin="8dp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
</FrameLayout>
|
|
|
@ -1,43 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item
|
|
||||||
android:id="@+id/remove_feed"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/remove_feed_label"
|
|
||||||
android:icon="@drawable/ic_delete"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/keep_updated"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/keep_updated"
|
|
||||||
android:icon="@drawable/ic_refresh"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/autodownload"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/auto_download_label"
|
|
||||||
android:icon="@drawable/ic_download"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/autoDeleteDownload"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/auto_delete_label"
|
|
||||||
android:icon="@drawable/ic_delete_auto"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/playback_speed"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/playback_speed"
|
|
||||||
android:icon="@drawable/ic_playback_speed"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/edit_tags"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/edit_tags"
|
|
||||||
android:icon="@drawable/ic_tag"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/associate_queue"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/pref_feed_associated_queue"
|
|
||||||
android:icon="@drawable/ic_playlist_play"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/export_opml"
|
|
||||||
android:menuCategory="container"
|
|
||||||
android:title="@string/opml_export_label"
|
|
||||||
android:icon="@drawable/baseline_import_export_24"/>
|
|
||||||
</menu>
|
|
|
@ -26,6 +26,9 @@
|
||||||
<item
|
<item
|
||||||
android:id="@+id/refresh_item"
|
android:id="@+id/refresh_item"
|
||||||
android:title="@string/refresh_label"
|
android:title="@string/refresh_label"
|
||||||
android:menuCategory="container"
|
custom:showAsAction="never" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/toggle_grid_list"
|
||||||
|
android:title="@string/toggle_grid_list"
|
||||||
custom:showAsAction="never" />
|
custom:showAsAction="never" />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
<string name="error_label">Error</string>
|
<string name="error_label">Error</string>
|
||||||
<string name="error_msg_prefix">An error occurred:</string>
|
<string name="error_msg_prefix">An error occurred:</string>
|
||||||
<string name="refresh_label">Refresh</string>
|
<string name="refresh_label">Refresh</string>
|
||||||
|
<string name="toggle_grid_list">Toggle grid list</string>
|
||||||
<string name="refreshing_label">Refreshing</string>
|
<string name="refreshing_label">Refreshing</string>
|
||||||
<string name="reconcile_label">Reconcile</string>
|
<string name="reconcile_label">Reconcile</string>
|
||||||
<string name="chapters_label">Chapters</string>
|
<string name="chapters_label">Chapters</string>
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
# 6.8.3 (Preview release)
|
||||||
|
|
||||||
|
* most of Subscriptions view are in Jetpack Compose, feed viewholder and adapters etc are removed
|
||||||
|
* added toggle grid and list views in the menu of Subscriptions
|
||||||
|
* migrated reliance on compose.material to compose.material3
|
||||||
|
* not yet for prime time
|
||||||
|
|
||||||
# 6.8.2 (Preview release)
|
# 6.8.2 (Preview release)
|
||||||
|
|
||||||
* AudioPlayerFragment got overhauled. migrated to Jetpack Compose and PlayUI and PlayerDetailed fragments are Removed
|
* AudioPlayerFragment got overhauled. migrated to Jetpack Compose and PlayUI and PlayerDetailed fragments are Removed
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
Version 6.8.3 (preview release):
|
||||||
|
|
||||||
|
* most of Subscriptions view are in Jetpack Compose, feed viewholder and adapters etc are removed
|
||||||
|
* added toggle grid and list views in the menu of Subscriptions
|
||||||
|
* migrated reliance on compose.material to compose.material3
|
||||||
|
* not yet for prime time
|
|
@ -33,7 +33,8 @@ kotlin = "2.0.20"
|
||||||
kotlinxCoroutinesAndroid = "1.8.1"
|
kotlinxCoroutinesAndroid = "1.8.1"
|
||||||
libraryBase = "2.1.0"
|
libraryBase = "2.1.0"
|
||||||
lifecycleRuntimeKtx = "2.8.6"
|
lifecycleRuntimeKtx = "2.8.6"
|
||||||
material = "1.7.2"
|
#material = "1.7.2"
|
||||||
|
material3 = "1.3.0"
|
||||||
material3Android = "1.3.0"
|
material3Android = "1.3.0"
|
||||||
materialVersion = "1.12.0"
|
materialVersion = "1.12.0"
|
||||||
media3Common = "1.4.1"
|
media3Common = "1.4.1"
|
||||||
|
@ -87,8 +88,9 @@ androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents"
|
||||||
androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "gridlayout" }
|
androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "gridlayout" }
|
||||||
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junit" }
|
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junit" }
|
||||||
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||||
androidx-material = { module = "androidx.compose.material:material", version.ref = "material" }
|
#androidx-material = { module = "androidx.compose.material:material", version.ref = "material" }
|
||||||
androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" }
|
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
|
||||||
|
androidx-material3-android = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" }
|
||||||
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3Exoplayer" }
|
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3Exoplayer" }
|
||||||
androidx-media3-media3-datasource-okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3Ui" }
|
androidx-media3-media3-datasource-okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3Ui" }
|
||||||
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "media3Ui" }
|
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "media3Ui" }
|
||||||
|
|
Loading…
Reference in New Issue