mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-04 17:37:25 +00:00
Appearance: dirty font sizes
This commit is contained in:
parent
7821e3de1a
commit
6b3d396631
4 changed files with 25 additions and 40 deletions
|
|
@ -350,11 +350,11 @@ class UIUtils(private val context: Context) {
|
|||
|
||||
// Size
|
||||
fun setClockSize(clock: TextClock) {
|
||||
setTextSize(clock, sharedPreferenceManager.getClockSize(), 48F, 58F, 70F, 78F, 82F, 84F)
|
||||
setTextSize(clock, sharedPreferenceManager.getClockSize(), 66F, 58F, 70F, 78F, 82F, 84F)
|
||||
}
|
||||
|
||||
fun setDateSize(dateText: TextClock) {
|
||||
setTextSize(dateText, sharedPreferenceManager.getDateSize(), 14F, 17F, 20F, 23F, 26F, 29F)
|
||||
setTextSize(dateText, sharedPreferenceManager.getDateSize(), 22F, 17F, 20F, 23F, 26F, 29F)
|
||||
}
|
||||
|
||||
fun setShortcutsSize(shortcuts: LinearLayout) {
|
||||
|
|
@ -363,7 +363,9 @@ class UIUtils(private val context: Context) {
|
|||
|
||||
shortcuts.children.forEach {
|
||||
if (it is TextView) {
|
||||
setShortcutSize(it, size)
|
||||
it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22F)
|
||||
// val padding = 15
|
||||
// it.setPadding(0, dpToPx(padding), 0, dpToPx(padding))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -373,9 +375,9 @@ class UIUtils(private val context: Context) {
|
|||
when (size) {
|
||||
"tiny" -> {
|
||||
shortcut.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
5, // Min text size in SP
|
||||
20, // Max text size in SP
|
||||
2, // Step granularity in SP
|
||||
22, // Min text size in SP
|
||||
22, // Max text size in SP
|
||||
1, // Step granularity in SP
|
||||
TypedValue.COMPLEX_UNIT_SP // Unit of measurement
|
||||
)
|
||||
}
|
||||
|
|
@ -434,9 +436,9 @@ class UIUtils(private val context: Context) {
|
|||
regionText: TextView? = null
|
||||
) {
|
||||
val size = sharedPreferenceManager.getAppSize()
|
||||
setTextSize(textView, size, 21F, 24F, 27F, 30F, 33F, 36F)
|
||||
setTextSize(textView, size, 22F, 24F, 27F, 30F, 33F, 36F)
|
||||
if (editText != null) {
|
||||
setTextSize(editText, size, 21F, 24F, 27F, 30F, 33F, 36F)
|
||||
setTextSize(editText, size, 22F, 24F, 27F, 30F, 33F, 36F)
|
||||
}
|
||||
if (regionText != null) {
|
||||
setTextSize(regionText, size, 11F, 14F, 17F, 20F, 23F, 26F)
|
||||
|
|
@ -444,11 +446,11 @@ class UIUtils(private val context: Context) {
|
|||
}
|
||||
|
||||
fun setSearchSize(searchView: TextInputEditText) {
|
||||
setTextSize(searchView, sharedPreferenceManager.getSearchSize(), 18F, 21F, 25F, 27F, 30F, 33F)
|
||||
setTextSize(searchView, sharedPreferenceManager.getSearchSize(), 22F, 21F, 25F, 27F, 30F, 33F)
|
||||
}
|
||||
|
||||
fun setMenuTitleSize(menuTitle: TextView) {
|
||||
setTextSize(menuTitle, sharedPreferenceManager.getAppSize(), 27F, 30F, 33F, 36F, 39F, 42F)
|
||||
setTextSize(menuTitle, sharedPreferenceManager.getAppSize(), 22F, 30F, 33F, 36F, 39F, 42F)
|
||||
}
|
||||
|
||||
private fun setTextSize(view: TextView, size: String?, t: Float, s: Float, m: Float, l: Float, x: Float, h: Float) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:fadingEdgeLength="20dp"
|
||||
android:fadingEdgeLength="2dp"
|
||||
android:padding="0dp"
|
||||
android:requiresFadingEdge="vertical"
|
||||
android:scrollbars="none">
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="22dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="0.1"
|
||||
android:orientation="horizontal"
|
||||
|
|
@ -196,14 +196,13 @@
|
|||
android:id="@+id/topSpace"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.22" />
|
||||
android:layout_weight="0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -220,7 +219,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingHorizontal="0dp"
|
||||
|
|
@ -237,7 +235,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -254,7 +251,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -271,7 +267,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -288,7 +283,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -305,7 +299,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -322,7 +315,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -339,7 +331,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -356,7 +347,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -373,7 +363,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -390,7 +379,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -407,7 +395,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -424,7 +411,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
@ -441,7 +427,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="8dp"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:visibility="invisible">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
|
@ -37,8 +37,6 @@
|
|||
android:shadowRadius="10"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#FFF3F3F3"
|
||||
android:textColorHighlight="#5F33B5E5"
|
||||
android:textSize="28sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
|
|
@ -65,8 +63,8 @@
|
|||
android:drawablePadding="8dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingHorizontal="0dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:shadowColor="#00FFFFFF"
|
||||
android:shadowRadius="10"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
|
|
@ -88,7 +86,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/pin"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -102,7 +100,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/info"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -116,7 +114,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/uninstall"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -130,7 +128,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/rename"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -144,7 +142,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/hide"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -158,7 +156,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/app_action_background"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingVertical="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/close"
|
||||
android:textAlignment="center"
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
</string-array>
|
||||
|
||||
<string-array name="shortcut_spacing_values" translatable="false">
|
||||
<item>0.06</item>
|
||||
<item>0.15</item>
|
||||
<item>0.09</item>
|
||||
<item>0.11</item>
|
||||
<item>0.14</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue