Fixed #317
This commit is contained in:
parent
61fc0da8d0
commit
2578566659
@ -180,14 +180,15 @@ class TypographyFragment : Fragment() {
|
||||
}
|
||||
|
||||
binding.actionSecondTextSize.setOnClickListener {
|
||||
val dialog = BottomSheetMenu<Float>(requireContext(), header = getString(R.string.title_second_text_size)).setSelectedValue(
|
||||
Preferences.textSecondSize)
|
||||
(40 downTo 10).forEach {
|
||||
dialog.addItem("${it}sp", it.toFloat())
|
||||
}
|
||||
dialog.addOnSelectItemListener { value ->
|
||||
Preferences.textSecondSize = value
|
||||
}.show()
|
||||
BottomSheetPicker(
|
||||
requireContext(),
|
||||
items = (40 downTo 10).map { BottomSheetPicker.MenuItem("${it}sp", it.toFloat()) },
|
||||
getSelected = { Preferences.textSecondSize },
|
||||
header = getString(R.string.title_second_text_size),
|
||||
onItemSelected = {value ->
|
||||
if (value != null) Preferences.textSecondSize = value
|
||||
}
|
||||
).show()
|
||||
}
|
||||
|
||||
binding.actionFontColor.setOnClickListener {
|
||||
|
@ -12,6 +12,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical|start"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:id="@+id/main_layout"
|
||||
|
@ -12,10 +12,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="end"
|
||||
android:id="@+id/main_layout"
|
||||
android:animateLayoutChanges="true">
|
||||
<LinearLayout
|
||||
|
Loading…
x
Reference in New Issue
Block a user