refactor(home): 用FlexboxLayoutManager替换GridLayoutManager,支持动态行列布局

FlexboxLayoutManager(COLUMN+WRAP)天然列优先排列,数据无需重排。
item宽高在拿到接口行列数后直接计算,适配任意rows×cols配置。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 09:23:10 +08:00
co-authored by Claude Opus 4.7
parent 8aaba07cb6
commit 867cbb77be
4 changed files with 33 additions and 8 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layoutCard"
android:layout_width="match_parent"
android:layout_height="216dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
app:cardBackgroundColor="@color/bg_card_blue"
app:cardCornerRadius="12dp"