summaryrefslogtreecommitdiff
path: root/android/testData/guiTests/LayoutTest/app/src/main/res
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-12 18:45:57 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-12 18:45:57 +0000
commite9d32976820f5a7e46c62e46b789a146c5fb5517 (patch)
tree76101cd8ea740217955a1ac42d90626fa95dcc87 /android/testData/guiTests/LayoutTest/app/src/main/res
parent636fd55eded938ae5c43d938ebe8878bfccd6588 (diff)
parentd331590a050628ef8852cc724d3db915d7bdf9a3 (diff)
downloadidea-e9d32976820f5a7e46c62e46b789a146c5fb5517.tar.gz
Merge "Add rendering tests" into idea133
Diffstat (limited to 'android/testData/guiTests/LayoutTest/app/src/main/res')
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/drawable/progress.xml46
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout-land/layout2.xml9
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout-sw600dp/layout2.xml9
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout-xlarge/layout2.xml9
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout/included.xml44
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout/layout2.xml9
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout/outer.xml10
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout/textstyles.xml40
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/layout/widgets.xml166
-rw-r--r--android/testData/guiTests/LayoutTest/app/src/main/res/menu/my.xml5
10 files changed, 332 insertions, 15 deletions
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/drawable/progress.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/drawable/progress.xml
new file mode 100644
index 00000000000..c0f40e73bc6
--- /dev/null
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/drawable/progress.xml
@@ -0,0 +1,46 @@
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background">
+ <shape>
+ <corners android:radius="5dip" />
+ <gradient
+ android:startColor="#ff9d9e9d"
+ android:centerColor="#fffa5d5a"
+ android:centerY="0.75"
+ android:endColor="#ff747674"
+ android:angle="270"
+ />
+ </shape>
+ </item>
+
+ <item android:id="@android:id/secondaryProgress">
+ <clip>
+ <shape>
+ <corners android:radius="5dip" />
+ <gradient
+ android:startColor="#80ffd300"
+ android:centerColor="#80ffb600"
+ android:centerY="0.75"
+ android:endColor="#a0ffcb00"
+ android:angle="270"
+ />
+ </shape>
+ </clip>
+ </item>
+
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <corners android:radius="5dip" />
+ <gradient
+ android:startColor="#ffffd300"
+ android:centerColor="#ffffb600"
+ android:centerY="0.75"
+ android:endColor="#ffffcb00"
+ android:angle="270"
+ />
+ </shape>
+ </clip>
+ </item>
+
+</layer-list>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-land/layout2.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-land/layout2.xml
index 3c64480286e..5f319c791fa 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-land/layout2.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-land/layout2.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MyActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Layout 2, landscape folder"/>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-sw600dp/layout2.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-sw600dp/layout2.xml
index 1f4da867fee..f20210d1b8c 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-sw600dp/layout2.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-sw600dp/layout2.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MyActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Layout 2, sw600dp"/>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-xlarge/layout2.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-xlarge/layout2.xml
index 4ced381d226..01e28aaac55 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/layout-xlarge/layout2.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout-xlarge/layout2.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MyActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Layout 2, xlarge folder"/>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/included.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/included.xml
new file mode 100644
index 00000000000..c847e87de7f
--- /dev/null
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/included.xml
@@ -0,0 +1,44 @@
+<?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="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:showIn="@layout/textstyles">
+
+ <TextView
+ android:id="@+id/textView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Giant Text"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="#EEEEEE"
+ android:textSize="40dp"
+ android:layout_gravity="center_horizontal" />
+
+ <TextView
+ android:id="@+id/textView3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Large Text"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_gravity="center_horizontal" />
+
+ <TextView
+ android:id="@+id/textView4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Medium Text"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_gravity="center_horizontal" />
+
+ <TextView
+ android:id="@+id/textView5"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Small Text"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_gravity="center_horizontal" />
+
+
+</LinearLayout> \ No newline at end of file
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/layout2.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/layout2.xml
index f3565c002e3..153d7994b7d 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/layout2.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/layout2.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MyActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Layout 2, base folder"/>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/outer.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/outer.xml
index 55f188057e9..3cb2526d5ff 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/outer.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/outer.xml
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".MyActivity">
+
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -10,4 +14,4 @@
<include layout="@layout/inner" />
<include layout="@layout/inner" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/textstyles.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/textstyles.xml
new file mode 100644
index 00000000000..29bc9d04535
--- /dev/null
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/textstyles.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:background="@drawable/progress"
+ android:orientation="vertical" android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".MyActivity">
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true">
+
+ <Button
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="Button1"
+ android:id="@+id/button"
+ android:layout_weight="1" />
+
+ <Button
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:text="Button2"
+ android:id="@+id/button2"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <include
+ layout="@layout/included"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/included"
+ android:layout_centerVertical="true"
+ android:layout_centerHorizontal="true" />
+
+</RelativeLayout> \ No newline at end of file
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/layout/widgets.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/widgets.xml
new file mode 100644
index 00000000000..eb7ffde53a8
--- /dev/null
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/layout/widgets.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <Button
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:text="New Button" />
+
+ <Button
+ android:id="@+id/button2"
+ style="?android:attr/buttonStyleSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toEndOf="@+id/button"
+ android:layout_toRightOf="@+id/button"
+ android:text="New Button" />
+
+ <RadioButton
+ android:id="@+id/radioButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toEndOf="@+id/button2"
+ android:layout_toRightOf="@+id/button2"
+ android:checked="true"
+ android:text="New RadioButton" />
+
+ <CheckBox
+ android:id="@+id/checkBox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/button"
+ android:checked="true"
+ android:text="New CheckBox" />
+
+ <Switch
+ android:id="@+id/switch1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/button2"
+ android:layout_toEndOf="@+id/checkBox"
+ android:layout_toRightOf="@+id/checkBox"
+ android:checked="true"
+ android:text="New Switch" />
+
+ <ToggleButton
+ android:id="@+id/toggleButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/checkBox"
+ android:text="New ToggleButton" />
+
+ <ProgressBar
+ android:id="@+id/progressBar"
+ style="?android:attr/progressBarStyleLarge"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignTop="@+id/toggleButton"
+ android:layout_toEndOf="@+id/toggleButton"
+ android:layout_toRightOf="@+id/toggleButton" />
+
+ <ProgressBar
+ android:id="@+id/progressBar2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignTop="@+id/progressBar"
+ android:layout_toEndOf="@+id/progressBar"
+ android:layout_toRightOf="@+id/progressBar" />
+
+ <ProgressBar
+ android:id="@+id/progressBar3"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignEnd="@+id/radioButton"
+ android:layout_alignRight="@+id/radioButton"
+ android:layout_below="@+id/switch1"
+ android:layout_toEndOf="@+id/progressBar2"
+ android:layout_toRightOf="@+id/progressBar2"
+ android:indeterminate="false"
+ android:progress="50" />
+
+ <SeekBar
+ android:id="@+id/seekBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignEnd="@+id/progressBar3"
+ android:layout_alignLeft="@+id/progressBar3"
+ android:layout_alignRight="@+id/progressBar3"
+ android:layout_alignStart="@+id/progressBar3"
+ android:layout_below="@+id/progressBar3"
+ android:progress="30" />
+
+ <RatingBar
+ android:id="@+id/ratingBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignEnd="@+id/radioButton"
+ android:layout_alignRight="@+id/radioButton"
+ android:layout_below="@+id/progressBar2"
+ android:rating="2.5" />
+
+ <EditText
+ android:id="@+id/editText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignEnd="@+id/radioButton"
+ android:layout_alignLeft="@+id/progressBar2"
+ android:layout_alignRight="@+id/radioButton"
+ android:layout_alignStart="@+id/progressBar2"
+ android:layout_below="@+id/ratingBar"
+ android:hint="Hint Text">
+
+ <requestFocus />
+
+ </EditText>
+
+ <EditText
+ android:id="@+id/editText2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignEnd="@+id/editText"
+ android:layout_alignRight="@+id/editText"
+ android:layout_below="@+id/editText"
+ android:ems="10"
+ android:inputType="textPassword"
+ android:text="MyPassword" />
+
+ <TimePicker
+ android:id="@+id/timePicker"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/editText2" />
+
+ <ZoomControls
+ android:id="@+id/zoomControls"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/timePicker" />
+
+ <CheckedTextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="New CheckedTextView"
+ android:id="@+id/checkedTextView"
+ android:layout_below="@+id/zoomControls"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentEnd="true" />
+
+</RelativeLayout> \ No newline at end of file
diff --git a/android/testData/guiTests/LayoutTest/app/src/main/res/menu/my.xml b/android/testData/guiTests/LayoutTest/app/src/main/res/menu/my.xml
index f1fa1552e1f..736eb40215f 100644
--- a/android/testData/guiTests/LayoutTest/app/src/main/res/menu/my.xml
+++ b/android/testData/guiTests/LayoutTest/app/src/main/res/menu/my.xml
@@ -6,4 +6,9 @@
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never" />
+ <item android:id="@+id/toolbar"
+ android:icon="@android:drawable/ic_dialog_email"
+ android:title="E-mail"
+ android:orderInCategory="200"
+ app:showAsAction="ifRoom" />
</menu>