Fix Cards layout control IDs

This commit is contained in:
ajp_anton
2026-08-29 23:14:02 +00:00
parent c8d7e5005e
commit 179dc3a1db
3 changed files with 21 additions and 14 deletions
@@ -113,9 +113,16 @@ class CardsLayoutFragment : Fragment(R.layout.fragment_cards_layout) {
private fun controls(lockscreen: Boolean): Controls { private fun controls(lockscreen: Boolean): Controls {
val b = binding!! val b = binding!!
return if (lockscreen) b.lockscreenSettings.run { return if (lockscreen) b.lockscreenSettings.run {
Controls(maxRows, maxIcons, evenDistribution, limitWidth, iconHeight, iconHeightValue) Controls(
lockscreenMaxRows,
lockscreenMaxIcons,
lockscreenEvenDistribution,
lockscreenLimitWidth,
lockscreenIconHeight,
lockscreenIconHeightValue,
)
} else b.aodSettings.run { } else b.aodSettings.run {
Controls(maxRows, maxIcons, evenDistribution, limitWidth, iconHeight, iconHeightValue) Controls(aodMaxRows, aodMaxIcons, aodEvenDistribution, aodLimitWidth, aodIconHeight, aodIconHeightValue)
} }
} }
@@ -5,14 +5,14 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="Max rows" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="Max rows" />
<Spinner android:id="@+id/max_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" /> <Spinner android:id="@+id/aod_max_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" />
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Max icons per row" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Max icons per row" />
<Spinner android:id="@+id/max_icons" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" /> <Spinner android:id="@+id/aod_max_icons" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" />
<com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/even_distribution" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Even distribution" /> <com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/aod_even_distribution" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Even distribution" />
<com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/limit_width" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Limit to screen width" /> <com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/aod_limit_width" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Limit to screen width" />
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center_vertical" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center_vertical" android:orientation="horizontal">
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Icon height (% of status bar)" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Icon height (% of status bar)" />
<TextView android:id="@+id/icon_height_value" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/aod_icon_height_value" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<SeekBar android:id="@+id/icon_height" android:layout_width="match_parent" android:layout_height="wrap_content" /> <SeekBar android:id="@+id/aod_icon_height" android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
@@ -5,14 +5,14 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="Max rows" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:text="Max rows" />
<Spinner android:id="@+id/max_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" /> <Spinner android:id="@+id/lockscreen_max_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" />
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Max icons per row" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Max icons per row" />
<Spinner android:id="@+id/max_icons" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" /> <Spinner android:id="@+id/lockscreen_max_icons" android:layout_width="wrap_content" android:layout_height="wrap_content" android:popupBackground="@drawable/dropdown_popup_background" />
<com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/even_distribution" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Even distribution" /> <com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/lockscreen_even_distribution" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Even distribution" />
<com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/limit_width" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Limit to screen width" /> <com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/lockscreen_limit_width" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Limit to screen width" />
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center_vertical" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center_vertical" android:orientation="horizontal">
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Icon height (% of status bar)" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Icon height (% of status bar)" />
<TextView android:id="@+id/icon_height_value" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/lockscreen_icon_height_value" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<SeekBar android:id="@+id/icon_height" android:layout_width="match_parent" android:layout_height="wrap_content" /> <SeekBar android:id="@+id/lockscreen_icon_height" android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>