mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Fixing Settings sticky header text overlapping with menu items (#928)
## Description - Adding a background for the Settings stickyHeader. This helps with visibility and prevents overlap with the menu items when scrolling. ### Related issues In the Settings screen, the header can overlap the text of the menu items when scrolling down. This is a minor UI bug only and does not affect functionality at all, but the fix seemed easy and harmless so I figured I'd give it a go. ### Testing Tested manually on TCL model 50S434 running Android TV. Tested manually using AVD emulation on Television (1080p) and Television (4K) preset devices. Reproduced the problem on all 3 devices and confirmed that my fix works across all. ## Screenshots Before: <img width="1920" height="1080" alt="before-settings-fix" src="https://github.com/user-attachments/assets/15f9916d-2583-4dc4-8302-cb1f3a395b1a" /> After: <img width="1920" height="1080" alt="after-settings-fix" src="https://github.com/user-attachments/assets/3f8781aa-7063-4eb4-bf4a-95ff34b9b1a1" /> ## AI or LLM usage None --------- Co-authored-by: Ray <154766448+damontecres@users.noreply.github.com>
This commit is contained in:
parent
7939fffd48
commit
55b148971e
1 changed files with 290 additions and 286 deletions
|
|
@ -11,8 +11,10 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
import androidx.compose.foundation.interaction.collectIsFocusedAsState
|
import androidx.compose.foundation.interaction.collectIsFocusedAsState
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
|
|
@ -166,14 +168,9 @@ fun PreferencesContent(
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
focusRequester.tryRequestFocus()
|
focusRequester.tryRequestFocus()
|
||||||
}
|
}
|
||||||
LazyColumn(
|
Column(
|
||||||
state = state,
|
|
||||||
horizontalAlignment = Alignment.Start,
|
|
||||||
verticalArrangement = Arrangement.spacedBy(0.dp),
|
|
||||||
contentPadding = PaddingValues(16.dp),
|
|
||||||
modifier = Modifier.background(MaterialTheme.colorScheme.surfaceColorAtElevation(1.dp)),
|
modifier = Modifier.background(MaterialTheme.colorScheme.surfaceColorAtElevation(1.dp)),
|
||||||
) {
|
) {
|
||||||
stickyHeader {
|
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(screenTitle),
|
text = stringResource(screenTitle),
|
||||||
style = MaterialTheme.typography.headlineSmall,
|
style = MaterialTheme.typography.headlineSmall,
|
||||||
|
|
@ -184,7 +181,13 @@ fun PreferencesContent(
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp),
|
.padding(vertical = 8.dp),
|
||||||
)
|
)
|
||||||
}
|
LazyColumn(
|
||||||
|
state = state,
|
||||||
|
horizontalAlignment = Alignment.Start,
|
||||||
|
verticalArrangement = Arrangement.spacedBy(0.dp),
|
||||||
|
contentPadding = PaddingValues(16.dp),
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
) {
|
||||||
if (UpdateChecker.ACTIVE &&
|
if (UpdateChecker.ACTIVE &&
|
||||||
preferenceScreenOption == PreferenceScreenOption.BASIC &&
|
preferenceScreenOption == PreferenceScreenOption.BASIC &&
|
||||||
preferences.autoCheckForUpdates &&
|
preferences.autoCheckForUpdates &&
|
||||||
|
|
@ -474,6 +477,7 @@ fun PreferencesContent(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (showPinFlow && currentUser != null) {
|
if (showPinFlow && currentUser != null) {
|
||||||
currentUser?.let { user ->
|
currentUser?.let { user ->
|
||||||
SetPinFlow(
|
SetPinFlow(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue