Skip to content

Instantly share code, notes, and snippets.

@davinctor
Created September 2, 2016 10:43
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 davinctor/5e4604c5e964ee7fa2b085d2684dab0e to your computer and use it in GitHub Desktop.
Save davinctor/5e4604c5e964ee7fa2b085d2684dab0e to your computer and use it in GitHub Desktop.
Most used views.
<?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="340dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/ivImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
tools:ignore="ContentDescription"
tools:src="@mipmap/ic_launcher" />
<TextView
android:id="@+id/tvText"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center"
android:gravity="bottom"
android:textSize="16sp"
android:textStyle="italic"
tools:text="Some test text" />
<EditText
android:id="@+id/etChangeableText"
android:layout_width="200dp"
android:layout_height="70sp"
android:layout_gravity="right|end"
android:gravity="top|left"
android:inputType="text|textCapWords"
android:padding="16dp"
tools:text="Editable text" />
<Button
android:id="@+id/bAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Text for button" />
<CheckBox
android:id="@+id/cbChecked"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
tools:text="Any agreement text" />
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rbMan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Man" />
<RadioButton
android:id="@+id/rbWoman"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
tools:text="Woman" />
</RadioGroup>
<ProgressBar
android:id="@+id/pbLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Switch
android:id="@+id/swLightController"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
tools:text="Enable light"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment