diff --git a/AnkiDroid/src/main/java/com/ichi2/preferences/SliderPreference.kt b/AnkiDroid/src/main/java/com/ichi2/preferences/SliderPreference.kt index e074b1cba392..1c6c5a5d6f50 100644 --- a/AnkiDroid/src/main/java/com/ichi2/preferences/SliderPreference.kt +++ b/AnkiDroid/src/main/java/com/ichi2/preferences/SliderPreference.kt @@ -48,7 +48,7 @@ import com.ichi2.annotations.NeedsTest * Format `string` or `plurals` to be used as template to display the value in the preference summary. * There must be ONLY ONE placeholder, which will be replaced by the preference value. * * app:displayValue (*optional*): whether to show the current preference value on a TextView - * by the end of the slider + * by the end of the preference * * app:displayFormat (*optional*): Format string to be used as template to display the value by * the end of the slider. There must be ONLY ONE placeholder, * which will be replaced by the preference value. @@ -137,7 +137,7 @@ class SliderPreference(context: Context, attrs: AttributeSet? = null) : Preferen summaryView.visibility = View.VISIBLE } - val displayValueTextView = holder.findViewById(R.id.valueDisplay) as TextView + val displayValueTextView = holder.findViewById(R.id.value_display) as TextView if (displayValue) { displayValueTextView.text = displayFormat?.let { String.format(it, value) } ?: value.toString() diff --git a/AnkiDroid/src/main/res/layout/preference_slider.xml b/AnkiDroid/src/main/res/layout/preference_slider.xml index cc91dc254f98..33b05f95c558 100644 --- a/AnkiDroid/src/main/res/layout/preference_slider.xml +++ b/AnkiDroid/src/main/res/layout/preference_slider.xml @@ -24,68 +24,56 @@ android:clipChildren="false" android:clipToPadding="false"> - - - - - - - - - - + android:layout_height="wrap_content"> + + + + - + + + + \ No newline at end of file