have customizable value hint for spinbox
All checks were successful
eden-license / license-header (pull_request) Successful in 27s

This commit is contained in:
nyx-ynx 2025-09-27 19:29:21 +02:00
parent cc56cc5511
commit 5b37b9e9b9
5 changed files with 6 additions and 2 deletions

View file

@ -398,7 +398,8 @@ abstract class SettingsItem(
titleId = R.string.overlay_auto_hide,
descriptionId = R.string.overlay_auto_hide_description,
min = 1,
max = 999
max = 999,
valueHint = R.string.seconds
)
)

View file

@ -16,6 +16,7 @@ class SpinBoxSetting(
titleString: String = "",
@StringRes descriptionId: Int = 0,
descriptionString: String = "",
val valueHint: Int,
val min: Int,
val max: Int
) : SettingsItem(setting, titleId, titleString, descriptionId, descriptionString) {

View file

@ -152,6 +152,7 @@ class SettingsDialogFragment : DialogFragment(), DialogInterface.OnClickListener
val currentValue = item.getSelectedValue()
spinboxBinding.editValue.setText(currentValue.toString())
spinboxBinding.textInputLayout.hint = getString(item.valueHint)
val dialog = MaterialAlertDialogBuilder(requireContext())
.setTitle(item.title)

View file

@ -30,7 +30,7 @@
android:layout_marginLeft="@dimen/spacing_medlarge"
android:layout_marginRight="@dimen/spacing_medlarge"
android:layout_weight="1"
android:hint="@string/value">
android:hint="Value">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_value"

View file

@ -12,6 +12,7 @@
<string name="app_notification_channel_id" translatable="false">Eden</string>
<string name="app_notification_channel_description">Eden Switch emulator notifications</string>
<string name="app_notification_running">Eden is Running</string>
<string name="seconds">Seconds</string>
<!-- Spinbox strings -->
<string name="increment">Increment</string>