Skip to content

Instantly share code, notes, and snippets.

@pokatomnik
Created February 9, 2018 22:37
Show Gist options
  • Save pokatomnik/45f0f2ccb347ac131f8d8c612a92d300 to your computer and use it in GitHub Desktop.
Save pokatomnik/45f0f2ccb347ac131f8d8c612a92d300 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:clickable="true"
android:focusable="true"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:paddingStart="@dimen/padding_list_item"
android:paddingLeft="@dimen/padding_list_item"
android:paddingRight="@dimen/padding_list_item"
android:paddingEnd="@dimen/padding_list_item">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:singleLine="true"
android:maxLines="1" />
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
android:layout_below="@+id/title_text"
android:singleLine="true"
android:maxLines="1" />
</RelativeLayout>
<Button
android:id="@+id/remove_item_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/delete_icon"
android:clickable="true"
android:focusable="true"
android:padding="16dp"
android:scaleX="0.5"
android:scaleY="0.5"
tools:layout_editor_absoluteX="340dp" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment