File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
java/com/tripletres/platformscience/ui/view/settings Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import androidx.compose.ui.res.stringResource
14
14
import androidx.compose.ui.unit.dp
15
15
import androidx.hilt.navigation.compose.hiltViewModel
16
16
import com.tripletres.platformscience.R
17
+ import com.tripletres.platformscience.util.SimpleSettingsUtil.Companion.ALGORITHM_BRANCH_BOUND
18
+ import com.tripletres.platformscience.util.SimpleSettingsUtil.Companion.ALGORITHM_GREEDY
17
19
18
20
/* *
19
21
* Simple settings view
@@ -37,15 +39,16 @@ fun SimpleSettingsView(modifier: Modifier? = Modifier) {
37
39
style = MaterialTheme .typography.caption,
38
40
modifier = Modifier .padding(top = 8 .dp)
39
41
)
40
- Row (verticalAlignment = Alignment . CenterVertically ) {
41
- uiState.value.algorithms.forEach { algorithm ->
42
+ uiState.value.algorithms.forEach { algorithm ->
43
+ Row (verticalAlignment = Alignment . CenterVertically ) {
42
44
RadioButton (selected = algorithm == uiState.value.algorithmSelected, onClick = {
43
45
viewModel.updateAlgorithmSelected(algorithm)
44
46
})
45
47
Text (
46
48
text = stringResource(
47
49
id = when (algorithm) {
48
-
50
+ ALGORITHM_GREEDY -> R .string.algorithm_greedy
51
+ ALGORITHM_BRANCH_BOUND -> R .string.algorithm_branch_and_bound
49
52
else -> R .string.algorithm_greedy
50
53
}))
51
54
}
Original file line number Diff line number Diff line change 20
20
//Algorithms
21
21
<string name =" algorithm" >Algorithm:</string >
22
22
<string name =" algorithm_greedy" >Greedy</string >
23
+ <string name =" algorithm_branch_and_bound" >Branch and bound</string >
23
24
24
25
//Common
25
26
<string name =" ok" >OK</string >
You can’t perform that action at this time.
0 commit comments