Skip to content

Instantly share code, notes, and snippets.

@Avjeet
Created August 9, 2018 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Avjeet/2f350feeafff17ec855a39891d8c2d66 to your computer and use it in GitHub Desktop.
Save Avjeet/2f350feeafff17ec855a39891d8c2d66 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/data_item_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/logger_card_margin"
app:cardCornerRadius="@dimen/logger_card_corner_rad">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/item_margin"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/length_0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="0.2"
android:src="@drawable/tile_icon_lux_meter"
android:tint="@color/colorPrimary" />
<LinearLayout
android:layout_width="@dimen/length_0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_left_margin"
android:layout_weight="0.6"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_marginStart="@dimen/content_left_margin">
<TextView
android:id="@+id/sensor_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@string/lux_meter"
android:textSize="18sp" />
<TextView
android:id="@+id/date_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/blue_grey" />
</LinearLayout>
<ImageView
android:id="@+id/delete_item"
android:layout_width="@dimen/length_0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/icn_btn_left_margin"
android:layout_weight="0.1"
android:src="@drawable/ic_delete_red_24dp"
android:layout_marginEnd="@dimen/icn_btn_left_margin" />
</LinearLayout>
</android.support.v7.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment