Adds simple complication sample from I/O code lab (w/o use of Oli's library)
for public release after code lab.
Change-Id: I19ec97231800d362701b2f45bd0a0d7f39770875
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_complication_simple.png b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_complication_simple.png
new file mode 100644
index 0000000..48d25ef
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-hdpi/preview_complication_simple.png
Binary files differ
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_left_dial.png b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_left_dial.png
new file mode 100644
index 0000000..93bb31c
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_left_dial.png
Binary files differ
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_right_dial.png b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_right_dial.png
new file mode 100644
index 0000000..5db3c98
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/drawable-xhdpi/complications_right_dial.png
Binary files differ
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_config.xml b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_config.xml
new file mode 100644
index 0000000..01f5cac
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_config.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2016 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.
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:background="@color/dark_grey"
+ android:paddingTop="4dp">
+
+ <TextView
+ android:id="@+id/header"
+ android:layout_width="match_parent"
+ android:gravity="center"
+ android:text="@string/complication_simple_config_name"
+ android:textSize="20sp"
+ android:layout_height="wrap_content"/>
+
+ <android.support.wearable.view.WearableListView
+ android:id="@+id/wearable_list"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent">
+ </android.support.wearable.view.WearableListView>
+</LinearLayout>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_list_item.xml b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_list_item.xml
new file mode 100644
index 0000000..e995271
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_complication_simple_list_item.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2016 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.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center">
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"/>
+
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:textColor="@color/white"
+ android:textSize="18sp"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values/arrays.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values/arrays.xml
new file mode 100644
index 0000000..a2e37ac
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values/arrays.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+-->
+<resources>
+ <string-array name="complication_simple_names">
+ <item>Left dial</item>
+ <item>Right dial</item>
+ </string-array>
+ <array name="complication_simple_icons">
+ <item>@drawable/complications_left_dial</item>
+ <item>@drawable/complications_right_dial</item>
+ </array>
+</resources>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
index 4090995..e4b2717 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
@@ -18,6 +18,7 @@
<string name="opengl_name">Sample OpenGL</string>
<string name="interactive_name">Sample Interactive</string>
<string name="analog_name">Sample Analog</string>
+ <string name="complication_simple">Sample Complication Simple</string>
<string name="sweep_name">Sample Sweep</string>
<string name="card_bounds_name">Sample Card Bounds</string>
<string name="digital_name">Sample Digital</string>
@@ -42,6 +43,9 @@
<string name="title_activity_calendar_watch_face_permission">Calendar Permission Activity</string>
<string name="calendar_permission_text">WatchFace requires Calendar access.</string>
+ <string name="complication_simple_config_name">Configuration</string>
+ <string name="complications_provider_random_number">Random Number</string>
+
<!-- TODO: this should be shared (needs covering all the samples with Gradle build model) -->
<string name="color_black">Black</string>
<string name="color_blue">Blue</string>