Skip to content

Instantly share code, notes, and snippets.

@rohitsthaa
Created October 26, 2015 17:09
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 rohitsthaa/7e8404a6e2c97c88d7cb to your computer and use it in GitHub Desktop.
Save rohitsthaa/7e8404a6e2c97c88d7cb 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"
android:layout_width="match_parent"
android:layout_height="70dp"
android:weightSum="100"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="20">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@android:drawable/ic_dialog_alert"
android:scaleType="fitXY"
android:text="Name" />
</LinearLayout>
<LinearLayout
android:layout_weight="80"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_weight="1"
android:layout_gravity="center"/>
<TextView
android:id="@+id/phonenumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="italic"
android:layout_gravity="center"/>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment