pendientes_items.xml 5.11 KB
Newer Older
1 2 3 4 5 6
<?xml version="1.0" encoding="utf-8"?>
<com.chauthai.swipereveallayout.SwipeRevealLayout
    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"
    android:id="@+id/swipe_layout"
7
    android:background="#FFFFFF"
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    android:layout_width="match_parent"
    android:layout_height="100dp"
    app:dragEdge="right"
    app:mode="same_level">

    <FrameLayout
        android:id="@+id/delete_layout"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="#f44336"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?android:attr/selectableItemBackground">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:padding="16dp"
            android:textColor="@android:color/white"
            android:textSize="18sp"
            android:textStyle="bold" />
    </FrameLayout>

    <FrameLayout
        android:id="@+id/front_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
36
        android:background="#FFFFFF"
37 38 39 40 41 42 43
        android:paddingStart="8dp"
        android:paddingEnd="8dp">

        <androidx.cardview.widget.CardView
            android:id="@+id/card_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
44
            android:background="#FFFFFF"
45 46 47 48 49 50 51 52 53 54 55 56
            android:clickable="true"
            android:focusable="true"
            android:foreground="?android:attr/selectableItemBackground"
            app:cardCornerRadius="16dp"
            app:cardUseCompatPadding="true"
            app:contentPaddingBottom="8dp"
            app:contentPaddingLeft="16dp"
            app:contentPaddingRight="16dp"
            app:contentPaddingTop="8dp">

            <RelativeLayout
                android:layout_width="match_parent"
57 58
                android:layout_height="match_parent"
                android:background="#FFFFFF">
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118

                <LinearLayout
                    android:id="@+id/llDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:gravity="center"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/date_day"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:includeFontPadding="false"
                        android:textColor="@color/colorPrimary"
                        android:textSize="28sp"
                        android:textStyle="bold"
                        tools:text="14" />

                    <TextView
                        android:id="@+id/date_month"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:lineSpacingExtra="0dp"
                        android:includeFontPadding="false"
                        android:textColor="#FD5C7F"
                        android:textSize="16sp"
                        tools:text="APR" />
                </LinearLayout>

                <View
                    android:id="@+id/view"
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginStart="16dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginEnd="16dp"
                    android:layout_marginBottom="8dp"
                    android:layout_toEndOf="@id/llDate"
                    android:background="@color/colorPrimary" />

                <TextView
                    android:id="@+id/title"
                    style="@style/TextAppearance.MaterialComponents.Body1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_toEndOf="@id/view"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="@color/colorPrimary"
                    tools:text="Title" />

                <TextView
                    android:id="@+id/message_view"
                    style="@style/TextAppearance.MaterialComponents.Body2"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_below="@id/title"
                    android:layout_marginTop="4dp"
                    android:layout_toEndOf="@id/view"
119
                    android:textColor="@color/colorPrimary"
120 121 122 123 124 125 126 127
                    android:ellipsize="end"
                    android:maxLines="2"
                    tools:text="Message" />

            </RelativeLayout>
        </androidx.cardview.widget.CardView>
    </FrameLayout>
</com.chauthai.swipereveallayout.SwipeRevealLayout>