| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2015 The Android Open Source Project |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <!-- |
| Default configuration for various views to be rendered |
| TODO: Remove views that don't have custom configuration |
| TODO: Parameterize the custom width (200dip) in the below? |
| --> |
| <LinearLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:orientation="vertical"> |
| |
| <!-- Widgets Group --> |
| <TextView |
| android:text="TextView" |
| android:id="TextView" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </TextView> |
| |
| <TextView |
| android:text="Large" |
| android:id="LargeText" |
| android:textAppearance="?android:attr/textAppearanceLarge" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </TextView> |
| |
| <TextView |
| android:text="Medium" |
| android:id="MediumText" |
| android:textAppearance="?android:attr/textAppearanceMedium" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </TextView> |
| |
| <TextView |
| android:text="Small" |
| android:id="SmallText" |
| android:textAppearance="?android:attr/textAppearanceSmall" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </TextView> |
| |
| <Button |
| android:text="Button" |
| android:id="Button" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </Button> |
| <Button |
| android:text="Small" |
| style="?android:attr/buttonStyleSmall" |
| android:id="SmallButton" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </Button> |
| <RadioButton |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:id="RadioButton" |
| android:text="RadioButton" |
| android:checked="true"> |
| </RadioButton> |
| <CheckBox |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:text="CheckBox" |
| android:id="CheckBox" |
| android:checked="true"> |
| </CheckBox> |
| <Switch |
| android:id="Switch" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| </Switch> |
| <ToggleButton |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:checked="false" |
| android:id="ToggleButton" |
| android:text="ToggleButton"> |
| </ToggleButton> |
| <ProgressBar |
| android:id="ProgressBarLarge" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| style="@android:style/Widget.ProgressBar.Large"> |
| </ProgressBar> |
| <ProgressBar |
| android:id="ProgressBarNormal" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| style="@android:style/Widget.ProgressBar"> |
| </ProgressBar> |
| <ProgressBar |
| android:id="ProgressBarSmall" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:paddingBottom="2dip" |
| style="@android:style/Widget.ProgressBar.Small"> |
| </ProgressBar> |
| <ProgressBar |
| android:id="ProgressBarHorizontal" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content" |
| android:progress="30" |
| style="@android:style/Widget.ProgressBar.Horizontal"> |
| </ProgressBar> |
| <SeekBar |
| android:layout_height="wrap_content" |
| android:id="SeekBar" |
| android:layout_width="200dip" |
| android:progress="30"> |
| </SeekBar> |
| <RatingBar |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:id="RatingBar" |
| android:rating="1"> |
| </RatingBar> |
| <Spinner |
| android:layout_height="wrap_content" |
| android:id="Spinner" |
| android:layout_width="200dip"> |
| </Spinner> |
| |
| <!-- Text Fields Group --> |
| <EditText |
| android:id="PlainText" |
| android:text="abc" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="PersonName" |
| android:inputType="textPersonName" |
| android:text="Firstname Lastname" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="Password" |
| android:inputType="textPassword" |
| android:text="••••••••" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <!-- android:inputType="numberPassword" not used here to allow digits in preview only --> |
| <EditText |
| android:id="PasswordNumeric" |
| android:text="1•••2•••3" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="Email" |
| android:inputType="textEmailAddress" |
| android:text="user@domain" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="Phone" |
| android:inputType="phone" |
| android:text="(555) 0100" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="PostalAddress" |
| android:inputType="textPostalAddress" |
| android:text="Address" |
| android:layout_width="200dip" |
| android:layout_height="100dip"> |
| </EditText> |
| |
| <EditText |
| android:id="MultilineText" |
| android:inputType="textMultiLine" |
| android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor" |
| android:layout_width="200dip" |
| android:layout_height="100dip"> |
| </EditText> |
| |
| <EditText |
| android:id="Time" |
| android:inputType="time" |
| android:text="12:00am" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="Date" |
| android:inputType="date" |
| android:text="1/1/2011" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="Number" |
| android:inputType="number" |
| android:text="42" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="NumberSigned" |
| android:inputType="numberSigned" |
| android:text="-42" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| |
| <EditText |
| android:id="NumberDecimal" |
| android:inputType="numberDecimal" |
| android:text="42.0" |
| android:layout_width="200dip" |
| android:layout_height="wrap_content"> |
| </EditText> |
| </LinearLayout> |