Skip to content

Commit dee09f1

Browse files
committed
Chore: Improve Material 3 Lists & Cards
Signed-off-by: imknown <imknown@qq.com>
1 parent 93de754 commit dee09f1

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

app/src/main/java/net/imknown/android/forefrontinfo/ui/base/list/res/layout/base_list_fragment.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
android:id="@+id/recycler_view"
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14+
android:background="?attr/colorSurfaceContainer"
1415
android:clipToPadding="false"
1516
android:scrollbars="vertical"
1617
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
1718
tools:itemCount="10"
1819
tools:listitem="@layout/my_view_holder" />
19-
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
20-
20+
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

app/src/main/java/net/imknown/android/forefrontinfo/ui/base/list/res/layout/my_view_holder.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
5-
style="@style/Widget.Material3.CardView.Elevated"
5+
style="@style/Widget.Material3.CardView.Filled"
66
android:layout_width="match_parent"
77
android:layout_height="wrap_content"
88
android:clickable="true"
99
android:focusable="true"
10+
app:cardBackgroundColor="?attr/colorSurfaceBright"
1011
tools:context=".ui.base.list.MyAdapter"
1112
tools:layout_marginHorizontal="@dimen/item_divider_space_horizontal"
1213
tools:layout_marginTop="@dimen/item_divider_space_vertical">

0 commit comments

Comments
 (0)