mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-04 17:37:25 +00:00
Added more possible shortcuts. Now there can be up to 15 shortcuts.
This commit is contained in:
parent
562e728c69
commit
b47fa4b48c
4 changed files with 129 additions and 5 deletions
|
|
@ -163,7 +163,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
}
|
||||
|
||||
private fun setShortcuts() {
|
||||
val shortcuts = arrayOf(R.id.app1, R.id.app2, R.id.app3, R.id.app4, R.id.app5, R.id.app6, R.id.app7, R.id.app8)
|
||||
val shortcuts = arrayOf(R.id.app1, R.id.app2, R.id.app3, R.id.app4, R.id.app5, R.id.app6, R.id.app7, R.id.app8, R.id.app9, R.id.app10, R.id.app11, R.id.app12, R.id.app13, R.id.app14, R.id.app15)
|
||||
|
||||
for (i in shortcuts.indices) {
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class UIUtils(context: Context) {
|
|||
when (size) {
|
||||
"small" -> {
|
||||
shortcut.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
18, // Min text size in SP
|
||||
5, // Min text size in SP
|
||||
24, // Max text size in SP
|
||||
2, // Step granularity in SP
|
||||
TypedValue.COMPLEX_UNIT_SP // Unit of measurement
|
||||
|
|
@ -238,7 +238,7 @@ class UIUtils(context: Context) {
|
|||
|
||||
"medium" -> {
|
||||
shortcut.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
22, // Min text size in SP
|
||||
5, // Min text size in SP
|
||||
28, // Max text size in SP
|
||||
2, // Step granularity in SP
|
||||
TypedValue.COMPLEX_UNIT_SP // Unit of measurement
|
||||
|
|
@ -247,7 +247,7 @@ class UIUtils(context: Context) {
|
|||
|
||||
"large" -> {
|
||||
shortcut.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
26, // Min text size in SP
|
||||
5, // Min text size in SP
|
||||
32, // Max text size in SP
|
||||
2, // Step granularity in SP
|
||||
TypedValue.COMPLEX_UNIT_SP // Unit of measurement
|
||||
|
|
@ -256,7 +256,7 @@ class UIUtils(context: Context) {
|
|||
|
||||
"extra" -> {
|
||||
shortcut.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
30, // Min text size in SP
|
||||
5, // Min text size in SP
|
||||
36, // Max text size in SP
|
||||
2, // Step granularity in SP
|
||||
TypedValue.COMPLEX_UNIT_SP // Unit of measurement
|
||||
|
|
|
|||
|
|
@ -260,6 +260,123 @@
|
|||
android:textSize="28sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeMaxTextSize="32sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app11"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:textSize="28sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:textSize="28sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:textSize="28sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app14"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:textSize="28sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app15"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.09"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:clickable="false"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="@string/shortcut_default"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||
android:textColor="#F3F3F3"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
|
|
|||
|
|
@ -58,6 +58,13 @@
|
|||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
<item>14</item>
|
||||
<item>15</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="h_alignment_options">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue