Moodl/app/src/main/res/layout/custom_transaction_row.xml

107 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.daimajia.swipe.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/swipeLayout">
<!-- Bottom View Start-->
<LinearLayout
android:id="@+id/bottom_wrapper"
android:layout_width="100dp"
android:weightSum="1"
android:layout_height="match_parent"
android:orientation="horizontal">
<!--What you want to show-->
<LinearLayout
android:id="@+id/editTransactionLayout"
android:layout_width="wrap_content"
android:layout_weight="0.5"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:background="@color/green">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/ic_edit_white_24dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/deleteTransactionLayout"
android:layout_width="wrap_content"
android:layout_weight="0.5"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:background="@color/red">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/ic_delete_white_24dp"/>
</LinearLayout>
</LinearLayout>
<!-- Bottom View End-->
<!-- Surface View Start -->
<LinearLayout
android:padding="5dp"
android:background="#ffffff"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--What you want to show in SurfaceView-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:id="@+id/amountPurchased"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15dp"/>
<TextView
android:id="@+id/puchasedValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="10dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:id="@+id/purchaseDate"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="right"/>
</LinearLayout>
</LinearLayout>
<!-- Surface View End -->
</com.daimajia.swipe.SwipeLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/separationLineSize"
android:layout_gravity="center_vertical"
android:background="@color/separationColor" />
</LinearLayout>