Update and cleanup

This commit is contained in:
soraefir
2025-09-21 12:58:00 +02:00
parent 6b2f786afe
commit 9c1374c99f
2 changed files with 17 additions and 17 deletions

View File

@@ -17,8 +17,8 @@ android {
applicationId 'net.helcel.beans' applicationId 'net.helcel.beans'
minSdk 28 minSdk 28
targetSdk 36 targetSdk 36
versionCode 3 versionCode 4
versionName "1.0c" versionName "1.0d"
} }
signingConfigs { signingConfigs {
create("release") { create("release") {

View File

@@ -16,8 +16,8 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.material.CheckboxDefaults import androidx.compose.material.CheckboxDefaults
import androidx.compose.material.MaterialTheme import androidx.compose.material.MaterialTheme
import androidx.compose.material.ScrollableTabRow
import androidx.compose.material.Tab import androidx.compose.material.Tab
import androidx.compose.material.TabRow
import androidx.compose.material.Text import androidx.compose.material.Text
import androidx.compose.material.TriStateCheckbox import androidx.compose.material.TriStateCheckbox
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@@ -111,21 +111,21 @@ fun EditPlaceScreen(loc: GeoLoc, onExit:()->Unit={}) {
Column { Column {
val currentTab = tabs.getOrNull(selectedTab) ?: return@Column val currentTab = tabs.getOrNull(selectedTab) ?: return@Column
TabRow(
ScrollableTabRow( selectedTabIndex = min(tabs.lastIndex, selectedTab),
selectedTabIndex = min(tabs.lastIndex,selectedTab) ) {
) { tabs.forEachIndexed { index, tab ->
tabs.forEachIndexed { index, tab -> Tab(
Tab( selected = selectedTab == index,
selected = selectedTab == index, onClick = {
onClick = { while (tabs.size > index + 1)
while (tabs.size > index + 1) tabs.removeAt(tabs.lastIndex)
tabs.removeAt(tabs.lastIndex) },
}, text = { Text(tab.fullName) }
text = { Text(tab.fullName) } )
) }
} }
}
LazyColumn( LazyColumn(
modifier = Modifier.fillMaxSize() modifier = Modifier.fillMaxSize()