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