Source

android-widget-tutorial / res / layout / main.xml

Full commit
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/widget_root" android:layout_height="200dp"
	android:layout_width="160dp" android:background="@drawable/background_2x2"
	android:orientation="vertical">
	<TextView android:id="@+id/tvTime" android:layout_width="match_parent"
		android:gravity="top|center_horizontal" android:paddingTop="30dp"
		android:textColor="@android:color/black" android:text="Loading"
		android:textSize="18sp" android:layout_height="wrap_content" />
	<TextView android:text="@string/on" android:id="@+id/txtOn"
		android:textColor="@color/green" android:gravity="center_horizontal"
		android:layout_width="fill_parent" android:textSize="14sp"
		android:layout_height="wrap_content" android:layout_marginTop="@dimen/states_margin_top" />
	<TextView android:text="@string/off" android:id="@+id/txtOff"
		android:textColor="@color/red" android:gravity="center_horizontal"
		android:layout_width="fill_parent" android:textSize="14sp"
		android:layout_height="wrap_content" android:layout_marginTop="@dimen/states_margin_top" />
	<TextView android:layout_width="fill_parent" android:id="@+id/txtVendor"
		android:textSize="9sp"
		android:gravity="center_horizontal" android:textColor="@android:color/black"
		android:layout_height="wrap_content" android:text="@string/vendor" android:layout_marginTop="12dp"/>
</LinearLayout>