Skip to content

Commit

Permalink
Work on MaterialCardView
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelschattgen committed Jan 3, 2024
1 parent 81baa4e commit 59f1990
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/beemdevelopment/aegis/ViewMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public float getDividerHeight() {
return 4;
}

return 20;
return 8;
}

public int getColumnSpan() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public void setShowProgress(boolean showProgress) {

public void setFocused(boolean focused) {
if (focused) {
_selected.setVisibility(View.VISIBLE);
_view.setBackgroundColor(ThemeHelper.getThemeColor(com.google.android.material.R.attr.colorSurfaceVariant, _view.getContext().getTheme()));
} else {
_view.setBackgroundColor(ThemeHelper.getThemeColor(com.google.android.material.R.attr.colorSurfaceContainer, _view.getContext().getTheme()));
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/card_entry.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:layout_height="wrap_content"
style="@style/Widget.Material3.CardView.Filled"
android:orientation="vertical">

<LinearLayout
Expand Down Expand Up @@ -173,4 +173,4 @@
android:layout_weight="1"/>
</LinearLayout>

</LinearLayout>
</com.google.android.material.card.MaterialCardView>
2 changes: 2 additions & 0 deletions app/src/main/res/layout/fragment_entry_list_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="0dp"
android:paddingHorizontal="8dp"
android:scrollbars="vertical"
android:scrollbarStyle="outsideOverlay"
android:id="@+id/rvKeyProfiles"
android:layout_weight="1"/>

Expand Down

0 comments on commit 59f1990

Please sign in to comment.