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

104 lines
4.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="@dimen/margin">
<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/editExchangeInfosLayout"
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/deleteExchangeInfosLayout"
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>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/exchange_icon_imageView"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="@dimen/margin"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_toEndOf="@id/exchange_icon_imageView"
android:layout_toStartOf="@id/exchange_account_off_imageView"
android:gravity="center_vertical"
android:foregroundGravity="center_vertical">
<TextView
android:id="@+id/exchange_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/cardViewTitle"
android:textColor="@color/mainTextViewColor"/>
<TextView
android:id="@+id/exchange_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/cardViewCaption"
android:textColor="@color/captionColor"/>
</LinearLayout>
<ImageView
android:id="@+id/exchange_account_off_imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_money_off_24dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:visibility="gone"/>
</RelativeLayout>
</com.daimajia.swipe.SwipeLayout>
</android.support.constraint.ConstraintLayout>