Advertisement
yakovenkodenis

Layout XML

Feb 8th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.90 KB | None | 0 0
  1. ---------------Main Activity XML---------------------
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <RelativeLayout
  5.    xmlns:android="http://schemas.android.com/apk/res/android"
  6.    xmlns:tools="http://schemas.android.com/tools"
  7.    xmlns:app="http://schemas.android.com/apk/res-auto"
  8.    android:orientation="vertical"
  9.    android:layout_width="match_parent"
  10.    android:layout_height="match_parent"
  11.    xmlns:fab="http://schemas.android.com/apk/res-auto">
  12.  
  13.  
  14.     <android.support.v7.widget.RecyclerView
  15.        android:id="@+id/itemsList"
  16.        android:layout_width="match_parent"
  17.        android:layout_height="wrap_content">
  18.  
  19.     </android.support.v7.widget.RecyclerView>
  20.  
  21.  
  22.  
  23.         <com.getbase.floatingactionbutton.AddFloatingActionButton
  24.            android:id="@+id/fab_add"
  25.            android:layout_width="wrap_content"
  26.            android:layout_height="wrap_content"
  27.            android:layout_alignParentBottom="true"
  28.            fab:fab_plusIconColor="@color/fab_add_icon_color"
  29.            fab:fab_colorNormal="@color/accent"
  30.            fab:fab_colorPressed="@color/fab_add_pressed_color"
  31.            android:layout_alignParentRight="true"
  32.            android:layout_marginBottom="16dp"
  33.            android:layout_marginRight="16dp"
  34.            android:layout_marginEnd="16dp"/>
  35.  
  36. </RelativeLayout>
  37.  
  38. ---------------------------------------------------
  39.  
  40. --------------RecyclerView Item XML----------------
  41. <?xml version="1.0" encoding="utf-8"?>
  42. <RelativeLayout
  43.    xmlns:android="http://schemas.android.com/apk/res/android"
  44.    android:orientation="horizontal"
  45.    android:layout_width="match_parent"
  46.    android:layout_height="51dp"
  47.    android:layout_marginTop="3dp"
  48.    android:layout_marginBottom="3dp">
  49.  
  50.  
  51.     <TextView
  52.        android:id="@+id/text_with_icon"
  53.        android:layout_width="41dp"
  54.        android:layout_height="41dp"
  55.        android:layout_alignParentLeft="true"
  56.        android:layout_alignParentStart="true"
  57.        android:layout_alignParentTop="true"
  58.        android:layout_gravity="center_vertical"
  59.        android:layout_marginLeft="18dp"
  60.        android:layout_marginStart="18dp"
  61.        android:layout_marginRight="18dp"
  62.        android:layout_marginTop="5dp"
  63.        android:background="@drawable/circle"
  64.        android:gravity="center"
  65.        android:textAllCaps="true"
  66.        android:text="a"
  67.        android:textColor="#fff"
  68.        android:textSize="22sp" />
  69.  
  70.     <LinearLayout
  71.        android:layout_width="wrap_content"
  72.        android:layout_height="wrap_content"
  73.        android:layout_centerInParent="true"
  74.        android:gravity="center_vertical"
  75.        android:layout_toRightOf="@+id/text_with_icon"
  76.        android:orientation="vertical" >
  77.  
  78.         <TextView
  79.            android:id="@+id/list_title"
  80.            android:layout_width="wrap_content"
  81.            android:layout_height="wrap_content"
  82.            android:paddingLeft="0dp"
  83.            android:paddingTop="3dp"
  84.            android:paddingBottom="3dp"
  85.            android:text="Dummy text"
  86.            android:textColor="#000"
  87.            android:textSize="16sp"
  88.            android:textStyle="bold" />
  89.  
  90.         <TextView
  91.            android:id="@+id/description"
  92.            android:layout_width="wrap_content"
  93.            android:layout_height="14dp"
  94.            android:text="Lorem ipsum dolor sit amet, consectetur..."
  95.            android:textColor="#000"
  96.            android:visibility="visible"
  97.            android:textSize="12sp"
  98.            android:textStyle="normal" />
  99.     </LinearLayout>
  100. </RelativeLayout>
  101.  
  102. -------------Item Decoration Divider XML---------
  103. <?xml version="1.0" encoding="utf-8"?>
  104. <shape xmlns:android="http://schemas.android.com/apk/res/android"
  105.    android:shape="rectangle">
  106.     <size
  107.        android:width="1dp"
  108.        android:height="1dp"/>
  109.     <solid android:color="@color/divider" />
  110. </shape>
  111. ------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement