Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------Main Activity XML---------------------
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:fab="http://schemas.android.com/apk/res-auto">
- <android.support.v7.widget.RecyclerView
- android:id="@+id/itemsList"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- </android.support.v7.widget.RecyclerView>
- <com.getbase.floatingactionbutton.AddFloatingActionButton
- android:id="@+id/fab_add"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- fab:fab_plusIconColor="@color/fab_add_icon_color"
- fab:fab_colorNormal="@color/accent"
- fab:fab_colorPressed="@color/fab_add_pressed_color"
- android:layout_alignParentRight="true"
- android:layout_marginBottom="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginEnd="16dp"/>
- </RelativeLayout>
- ---------------------------------------------------
- --------------RecyclerView Item XML----------------
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="51dp"
- android:layout_marginTop="3dp"
- android:layout_marginBottom="3dp">
- <TextView
- android:id="@+id/text_with_icon"
- android:layout_width="41dp"
- android:layout_height="41dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:layout_gravity="center_vertical"
- android:layout_marginLeft="18dp"
- android:layout_marginStart="18dp"
- android:layout_marginRight="18dp"
- android:layout_marginTop="5dp"
- android:background="@drawable/circle"
- android:gravity="center"
- android:textAllCaps="true"
- android:text="a"
- android:textColor="#fff"
- android:textSize="22sp" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:gravity="center_vertical"
- android:layout_toRightOf="@+id/text_with_icon"
- android:orientation="vertical" >
- <TextView
- android:id="@+id/list_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="0dp"
- android:paddingTop="3dp"
- android:paddingBottom="3dp"
- android:text="Dummy text"
- android:textColor="#000"
- android:textSize="16sp"
- android:textStyle="bold" />
- <TextView
- android:id="@+id/description"
- android:layout_width="wrap_content"
- android:layout_height="14dp"
- android:text="Lorem ipsum dolor sit amet, consectetur..."
- android:textColor="#000"
- android:visibility="visible"
- android:textSize="12sp"
- android:textStyle="normal" />
- </LinearLayout>
- </RelativeLayout>
- -------------Item Decoration Divider XML---------
- <?xml version="1.0" encoding="utf-8"?>
- <shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <size
- android:width="1dp"
- android:height="1dp"/>
- <solid android:color="@color/divider" />
- </shape>
- ------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement