Skip to content

Instantly share code, notes, and snippets.

@MarcBruins
Created October 14, 2017 10:49
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 MarcBruins/40f77296ba53e8f5565f9407631e0f77 to your computer and use it in GitHub Desktop.
Save MarcBruins/40f77296ba53e8f5565f9407631e0f77 to your computer and use it in GitHub Desktop.
listitem_monkey.axml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
local:cardCornerRadius="2dp"
local:contentPadding="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<MvxImageView
android:id="@+id/monkey_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="2dp"
local:MvxBind="ImageUrl Image" />
<TextView
android:id="@+id/monkey_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/monkey_image"
android:layout_alignParentTop="true"
local:MvxBind="Text Name" />
<TextView
android:id="@+id/monkey_origin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/monkey_image"
android:layout_below="@+id/monkey_name"
local:MvxBind="Text Location" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/monkey_image"
android:layout_below="@+id/monkey_origin"
android:textSize="12sp"
local:MvxBind="Text Details" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment