Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2131bfcd authored by cketti's avatar cketti
Browse files

Switch from AndroidX CardView to MaterialCardView

parent 3b442f59
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ dependencies {
    implementation libs.androidx.lifecycle.viewmodel.ktx
    implementation libs.androidx.lifecycle.livedata.ktx
    implementation libs.androidx.constraintlayout
    implementation libs.androidx.cardview
    implementation libs.androidx.localbroadcastmanager
    implementation libs.androidx.swiperefreshlayout
    implementation libs.ckchangelog.core
+4 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ public class AttachmentView extends FrameLayout implements OnClickListener {
    private AttachmentViewInfo attachment;
    private AttachmentViewCallback callback;

    private View cardView;
    private View saveButton;
    private ImageView preview;
    private ImageView attachmentType;
@@ -46,6 +47,7 @@ public class AttachmentView extends FrameLayout implements OnClickListener {
    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        cardView = findViewById(R.id.attachment_card);
        saveButton = findViewById(R.id.save_button);
        preview = findViewById(R.id.attachment_preview);
        attachmentType = findViewById(R.id.attachment_type);
@@ -72,7 +74,7 @@ public class AttachmentView extends FrameLayout implements OnClickListener {
            saveButton.setVisibility(View.INVISIBLE);
        }

        setOnClickListener(this);
        cardView.setOnClickListener(this);
        saveButton.setOnClickListener(this);

        TextView attachmentName = findViewById(R.id.attachment_name);
@@ -102,7 +104,7 @@ public class AttachmentView extends FrameLayout implements OnClickListener {

    @Override
    public void onClick(View view) {
        if (view == this) {
        if (view.getId() == R.id.attachment_card) {
            onViewButtonClick();
        } else if (view.getId() == R.id.save_button) {
            onSaveButtonClick();
+2 −3
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    style="@style/AttachmentCard"
@@ -9,7 +9,6 @@
    android:layout_marginBottom="12dp"
    android:orientation="vertical"
    app:cardBackgroundColor="?attr/attachmentCardBackground"
    app:cardCornerRadius="2dp"
    app:cardElevation="1dp">

    <androidx.constraintlayout.widget.ConstraintLayout
@@ -109,4 +108,4 @@

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
+5 −4
Original line number Diff line number Diff line
@@ -7,16 +7,17 @@
    android:paddingBottom="4dp"
    android:id="@+id/attachment">

    <androidx.cardview.widget.CardView
    <com.google.android.material.card.MaterialCardView
        android:id="@+id/attachment_card"
        style="@style/AttachmentCard"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginBottom="12dp"
        android:orientation="vertical"
        android:foreground="?attr/selectableItemBackground"
        android:focusable="true"
        android:clickable="true"
        app:cardBackgroundColor="?attr/attachmentCardBackground"
        app:cardCornerRadius="2dp"
        app:cardElevation="1dp">

        <androidx.constraintlayout.widget.ConstraintLayout
@@ -97,6 +98,6 @@

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>
    </com.google.android.material.card.MaterialCardView>

</com.fsck.k9.ui.messageview.AttachmentView>
+2 −3
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
    android:outAnimation="@anim/fade_out"
    app:previewInitialChild="0">

    <androidx.cardview.widget.CardView
    <com.google.android.material.card.MaterialCardView
        style="@style/AttachmentCard"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
@@ -16,7 +16,6 @@
        android:layout_marginBottom="12dp"
        android:orientation="vertical"
        app:cardBackgroundColor="?attr/attachmentCardBackground"
        app:cardCornerRadius="2dp"
        app:cardElevation="1dp">

        <androidx.constraintlayout.widget.ConstraintLayout
@@ -84,7 +83,7 @@

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>
    </com.google.android.material.card.MaterialCardView>

    <ViewStub
        android:layout_width="match_parent"
Loading