aboutsummaryrefslogtreecommitdiff
path: root/deprecated/wearable/wear/SkeletonWearableApp
diff options
context:
space:
mode:
authorJeremy Walker <jewalker@google.com>2018-07-09 14:59:40 -0700
committerJeremy Walker <jewalker@google.com>2018-07-10 10:59:52 -0700
commit4abed90cab5149ee660bb0b0bb4207fafb04f534 (patch)
treeb36a9e6d99eef50c7cc5785135446f67ee5ed6a7 /deprecated/wearable/wear/SkeletonWearableApp
parenta06ec9916c9d94222f5c7b3e7846088e14bf10a0 (diff)
downloadandroid-4abed90cab5149ee660bb0b0bb4207fafb04f534.tar.gz
Moves all deprecated Wear samples into deprecated folder and updates
projects file. Bug: 111274033 Test: Manually tested. Change-Id: Ie7c353c1ac5d8180bc6028f02f736eb43afbc165
Diffstat (limited to 'deprecated/wearable/wear/SkeletonWearableApp')
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/CONTRIB.md35
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/.gitignore16
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/AndroidManifest.xml51
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/GridExampleActivity.java115
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/MainActivity.java129
-rwxr-xr-xdeprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 4584 bytes
-rwxr-xr-xdeprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2757 bytes
-rwxr-xr-xdeprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6603 bytes
-rwxr-xr-xdeprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11788 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/grid_activity.xml21
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/main_activity.xml84
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/dimens.xml21
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/strings.xml28
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/build.gradle14
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/buildSrc/build.gradle18
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xdeprecated/wearable/wear/SkeletonWearableApp/gradlew164
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/gradlew.bat90
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/screenshots/delayed_confirmation.pngbin0 -> 17065 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/screenshots/dismiss_overlay.pngbin0 -> 16019 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/screenshots/grid_view_pager.pngbin0 -> 6093 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/screenshots/skeleton_wearable_app.pngbin0 -> 17882 bytes
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/settings.gradle2
-rw-r--r--deprecated/wearable/wear/SkeletonWearableApp/template-params.xml74
25 files changed, 868 insertions, 0 deletions
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/CONTRIB.md b/deprecated/wearable/wear/SkeletonWearableApp/CONTRIB.md
new file mode 100644
index 00000000..14a4fcff
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/CONTRIB.md
@@ -0,0 +1,35 @@
+# How to become a contributor and submit your own code
+
+## Contributor License Agreements
+
+We'd love to accept your sample apps and patches! Before we can take them, we
+have to jump a couple of legal hurdles.
+
+Please fill out either the individual or corporate Contributor License Agreement (CLA).
+
+ * If you are an individual writing original source code and you're sure you
+ own the intellectual property, then you'll need to sign an [individual CLA]
+ (https://developers.google.com/open-source/cla/individual).
+ * If you work for a company that wants to allow you to contribute your work,
+ then you'll need to sign a [corporate CLA]
+ (https://developers.google.com/open-source/cla/corporate).
+
+Follow either of the two links above to access the appropriate CLA and
+instructions for how to sign and return it. Once we receive it, we'll be able to
+accept your pull requests.
+
+## Contributing A Patch
+
+1. Submit an issue describing your proposed change to the repo in question.
+1. The repo owner will respond to your issue promptly.
+1. If your proposed change is accepted, and you haven't already done so, sign a
+ Contributor License Agreement (see details above).
+1. Fork the desired repo, develop and test your code changes.
+1. Ensure that your code adheres to the existing style in the sample to which
+ you are contributing. Refer to the
+ [Android Code Style Guide]
+ (https://source.android.com/source/code-style.html) for the
+ recommended coding standards for this organization.
+1. Ensure that your code has an appropriate set of unit tests which all pass.
+1. Submit a pull request.
+
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/.gitignore b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/.gitignore
new file mode 100644
index 00000000..6eb878d4
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/.gitignore
@@ -0,0 +1,16 @@
+# Copyright 2013 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.
+src/template/
+src/common/
+build.gradle
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/AndroidManifest.xml b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..f9e89782
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/AndroidManifest.xml
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.google.wearable.app" >
+
+ <uses-sdk android:minSdkVersion="20"
+ android:targetSdkVersion="22" />
+
+ <uses-feature android:name="android.hardware.type.watch" />
+
+ <application
+ android:allowBackup="true"
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@android:style/Theme.DeviceDefault">
+ <activity
+ android:name=".MainActivity"
+ android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ <intent-filter>
+ <action android:name="com.google.android.clockwork.example.SKELETON"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
+ </activity>
+ <activity
+ android:name=".GridExampleActivity">
+ <intent-filter>
+ <action android:name="com.example.android.google.wearable.app.GRID_ACTIVITY"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/GridExampleActivity.java b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/GridExampleActivity.java
new file mode 100644
index 00000000..80af2a69
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/GridExampleActivity.java
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+
+package com.example.android.google.wearable.app;
+
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Point;
+import android.graphics.Typeface;
+import android.graphics.Paint.Align;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.support.wearable.view.CardFragment;
+import android.support.wearable.view.FragmentGridPagerAdapter;
+import android.support.wearable.view.GridViewPager;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class GridExampleActivity extends Activity {
+ private static final int NUM_ROWS = 10;
+ private static final int NUM_COLS = 3;
+
+ MainAdapter mAdapter;
+ GridViewPager mPager;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.grid_activity);
+ mPager = (GridViewPager) findViewById(R.id.fragment_container);
+ mAdapter = new MainAdapter(this, getFragmentManager());
+ mPager.setAdapter(mAdapter);
+
+ }
+
+ private static class MainAdapter extends FragmentGridPagerAdapter{
+ Map<Point, Drawable> mBackgrounds = new HashMap<Point, Drawable>();
+ private Context mContext;
+
+ public MainAdapter(Context ctx, FragmentManager fm) {
+ super(fm);
+ mContext = ctx;
+ }
+
+ @Override
+ public int getRowCount() {
+ return NUM_ROWS;
+ }
+
+ @Override
+ public int getColumnCount(int rowNum) {
+ return NUM_COLS;
+ }
+
+ @Override
+ public Fragment getFragment(int rowNum, int colNum) {
+ return MainFragment.newInstance(rowNum, colNum);
+ }
+
+ @Override
+ public Drawable getBackgroundForPage(int row, int column) {
+ Point pt = new Point(column, row);
+ Drawable drawable = mBackgrounds.get(pt);
+ if (drawable == null) {
+ Bitmap bm = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
+ Canvas c = new Canvas(bm);
+ Paint p = new Paint();
+ // Clear previous image.
+ c.drawRect(0, 0, 200, 200, p);
+ p.setAntiAlias(true);
+ p.setTypeface(Typeface.DEFAULT);
+ p.setTextSize(64);
+ p.setColor(Color.LTGRAY);
+ p.setTextAlign(Align.CENTER);
+ c.drawText(column+ "-" + row, 100, 100, p);
+ drawable = new BitmapDrawable(mContext.getResources(), bm);
+ mBackgrounds.put(pt, drawable);
+ }
+ return drawable;
+ }
+ }
+
+ public static class MainFragment extends CardFragment {
+ private static MainFragment newInstance(int rowNum, int colNum) {
+ Bundle args = new Bundle();
+ args.putString(CardFragment.KEY_TITLE, "Row:" + rowNum);
+ args.putString(CardFragment.KEY_TEXT, "Col:" + colNum);
+ MainFragment f = new MainFragment();
+ f.setArguments(args);
+ return f;
+ }
+ }
+}
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/MainActivity.java b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/MainActivity.java
new file mode 100644
index 00000000..817e195a
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/java/com/example/android/google/wearable/app/MainActivity.java
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+
+package com.example.android.google.wearable.app;
+
+import android.app.Activity;
+import android.app.Notification;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.NotificationCompat;
+import android.support.v4.app.NotificationManagerCompat;
+import android.support.v4.view.GestureDetectorCompat;
+import android.support.wearable.view.DelayedConfirmationView;
+import android.support.wearable.view.DismissOverlayView;
+import android.util.Log;
+import android.view.GestureDetector;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.ScrollView;
+
+public class MainActivity extends Activity
+ implements DelayedConfirmationView.DelayedConfirmationListener {
+ private static final String TAG = "MainActivity";
+
+ private static final int NOTIFICATION_ID = 1;
+ private static final int NOTIFICATION_REQUEST_CODE = 1;
+ private static final int NUM_SECONDS = 5;
+
+ private GestureDetectorCompat mGestureDetector;
+ private DismissOverlayView mDismissOverlayView;
+
+ @Override
+ public void onCreate(Bundle b) {
+ super.onCreate(b);
+ setContentView(R.layout.main_activity);
+
+ mDismissOverlayView = (DismissOverlayView) findViewById(R.id.dismiss_overlay);
+ mDismissOverlayView.setIntroText(R.string.intro_text);
+ mDismissOverlayView.showIntroIfNecessary();
+ mGestureDetector = new GestureDetectorCompat(this, new LongPressListener());
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent event) {
+ return mGestureDetector.onTouchEvent(event) || super.dispatchTouchEvent(event);
+ }
+
+ private class LongPressListener extends GestureDetector.SimpleOnGestureListener {
+ @Override
+ public void onLongPress(MotionEvent event) {
+ mDismissOverlayView.show();
+ }
+ }
+
+ /**
+ * Handles the button to launch a notification.
+ */
+ public void showNotification(View view) {
+ Notification notification = new NotificationCompat.Builder(this)
+ .setContentTitle(getString(R.string.notification_title))
+ .setContentText(getString(R.string.notification_title))
+ .setSmallIcon(R.drawable.ic_launcher)
+ .addAction(R.drawable.ic_launcher,
+ getText(R.string.action_launch_activity),
+ PendingIntent.getActivity(this, NOTIFICATION_REQUEST_CODE,
+ new Intent(this, GridExampleActivity.class),
+ PendingIntent.FLAG_UPDATE_CURRENT))
+ .build();
+ NotificationManagerCompat.from(this).notify(NOTIFICATION_ID, notification);
+ finish();
+ }
+
+
+ /**
+ * Handles the button press to finish this activity and take the user back to the Home.
+ */
+ public void onFinishActivity(View view) {
+ setResult(RESULT_OK);
+ finish();
+ }
+
+ /**
+ * Handles the button to start a DelayedConfirmationView timer.
+ */
+ public void onStartTimer(View view) {
+ DelayedConfirmationView delayedConfirmationView = (DelayedConfirmationView)
+ findViewById(R.id.timer);
+ delayedConfirmationView.setTotalTimeMs(NUM_SECONDS * 1000);
+ delayedConfirmationView.setListener(this);
+ delayedConfirmationView.start();
+ scroll(View.FOCUS_DOWN);
+ }
+
+ @Override
+ public void onTimerFinished(View v) {
+ Log.d(TAG, "onTimerFinished is called.");
+ scroll(View.FOCUS_UP);
+ }
+
+ @Override
+ public void onTimerSelected(View v) {
+ Log.d(TAG, "onTimerSelected is called.");
+ scroll(View.FOCUS_UP);
+ }
+
+ private void scroll(final int scrollDirection) {
+ final ScrollView scrollView = (ScrollView) findViewById(R.id.scroll);
+ scrollView.post(new Runnable() {
+ @Override
+ public void run() {
+ scrollView.fullScroll(scrollDirection);
+ }
+ });
+ }
+}
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100755
index 00000000..589f229d
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100755
index 00000000..77dd5713
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100755
index 00000000..fe34ebe1
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100755
index 00000000..ab80bcd1
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/grid_activity.xml b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/grid_activity.xml
new file mode 100644
index 00000000..c8670513
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/grid_activity.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<android.support.wearable.view.GridViewPager
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/fragment_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/main_activity.xml b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/main_activity.xml
new file mode 100644
index 00000000..c949e5fa
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/layout/main_activity.xml
@@ -0,0 +1,84 @@
+<?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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ScrollView
+ android:id="@+id/scroll"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:background="#000000"
+ android:fillViewport="true">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="2dp"
+ android:text="@string/main_activity_title_text"
+ android:textSize="36sp"
+ android:textColor="#006600"/>
+
+ <Button
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:onClick="showNotification"
+ android:text="@string/show_notification" />
+
+ <Button
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:onClick="onFinishActivity"
+ android:text="@string/finish_activity" />
+
+ <Button
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/start_timer_button"
+ android:onClick="onStartTimer"
+ android:text="@string/start_timer" />
+
+ <android.support.wearable.view.DelayedConfirmationView
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/timer"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:src="@drawable/ic_launcher"
+ app:circle_color="@color/blue"
+ app:circle_padding="@dimen/circle_padding"
+ app:circle_border_width="@dimen/circle_border_normal_width"
+ app:circle_border_color="@color/white"
+ app:circle_radius="@dimen/circle_radius"/>
+
+ </LinearLayout>
+
+ </ScrollView>
+
+ <android.support.wearable.view.DismissOverlayView
+ android:id="@+id/dismiss_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+</FrameLayout>
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/dimens.xml b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/dimens.xml
new file mode 100644
index 00000000..67c96779
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/dimens.xml
@@ -0,0 +1,21 @@
+<?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>
+ <dimen name="circle_border_normal_width">10dp</dimen>
+ <dimen name="circle_padding">5dp</dimen>
+ <dimen name="circle_radius">50dp</dimen>
+</resources>
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/strings.xml b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/strings.xml
new file mode 100644
index 00000000..3917d07d
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/Wearable/src/main/res/values/strings.xml
@@ -0,0 +1,28 @@
+<?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 name="app_name">Skeleton Wearable App</string>
+ <string name="intro_text">Long press to go back home.</string>
+ <string name="main_activity_title_text"> Main Activity </string>
+ <string name="grid_activity_title_text"> Grid Activity </string>
+ <string name="finish_activity"> Finish Activity </string>
+ <string name="start_timer"> Start Timer (5 sec) </string>
+ <string name="show_notification"> Show Notification </string>
+ <string name="notification_title"> Skeleton App Notification </string>
+ <string name="action_launch_activity">Launch Activity</string>
+</resources>
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/build.gradle b/deprecated/wearable/wear/SkeletonWearableApp/build.gradle
new file mode 100644
index 00000000..be1fa823
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/build.gradle
@@ -0,0 +1,14 @@
+
+
+
+
+// BEGIN_EXCLUDE
+import com.example.android.samples.build.SampleGenPlugin
+apply plugin: SampleGenPlugin
+
+samplegen {
+ pathToBuild "../../../../../build"
+ pathToSamplesCommon "../../../common"
+}
+apply from: "../../../../../build/build.gradle"
+// END_EXCLUDE
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/buildSrc/build.gradle b/deprecated/wearable/wear/SkeletonWearableApp/buildSrc/build.gradle
new file mode 100644
index 00000000..e344a8cb
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/buildSrc/build.gradle
@@ -0,0 +1,18 @@
+
+
+
+repositories {
+ mavenCentral()
+}
+dependencies {
+ compile 'org.freemarker:freemarker:2.3.20'
+}
+
+sourceSets {
+ main {
+ groovy {
+ srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
+ }
+ }
+}
+
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.jar b/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..8c0fb64a
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.properties b/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..86fc139a
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip \ No newline at end of file
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/gradlew b/deprecated/wearable/wear/SkeletonWearableApp/gradlew
new file mode 100755
index 00000000..91a7e269
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/gradlew.bat b/deprecated/wearable/wear/SkeletonWearableApp/gradlew.bat
new file mode 100644
index 00000000..8a0b282a
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/screenshots/delayed_confirmation.png b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/delayed_confirmation.png
new file mode 100644
index 00000000..29943617
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/delayed_confirmation.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/screenshots/dismiss_overlay.png b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/dismiss_overlay.png
new file mode 100644
index 00000000..142d7e47
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/dismiss_overlay.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/screenshots/grid_view_pager.png b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/grid_view_pager.png
new file mode 100644
index 00000000..f59c13d0
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/grid_view_pager.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/screenshots/skeleton_wearable_app.png b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/skeleton_wearable_app.png
new file mode 100644
index 00000000..4f172745
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/screenshots/skeleton_wearable_app.png
Binary files differ
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/settings.gradle b/deprecated/wearable/wear/SkeletonWearableApp/settings.gradle
new file mode 100644
index 00000000..9c2651c7
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/settings.gradle
@@ -0,0 +1,2 @@
+
+include ':Wearable'
diff --git a/deprecated/wearable/wear/SkeletonWearableApp/template-params.xml b/deprecated/wearable/wear/SkeletonWearableApp/template-params.xml
new file mode 100644
index 00000000..1441c1fa
--- /dev/null
+++ b/deprecated/wearable/wear/SkeletonWearableApp/template-params.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2013 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.
+-->
+<sample>
+ <name>SkeletonWearableApp</name>
+ <group>Wearable</group>
+ <package>com.example.android.google.wearable.app</package>
+
+ <targetSdkVersionWear>22</targetSdkVersionWear>
+
+ <strings>
+ <intro>
+ <![CDATA[
+ This sample is a mostly empty wearable app that implements a fullscreen activity
+ conforming to Android Wear best practices. Included in the sample are examples of GridViewPager,
+ DelayedConfirmationView, and DismissOverlayView. Developers who require a fullscreen activity for
+ their wearable app can use this sample as a starting point.
+ ]]>
+ </intro>
+ </strings>
+ <template src="base-build"/>
+ <template src="Wear"/>
+ <metadata>
+ <status>DEPRECATED</status>
+ <categories>Getting Started, Wearable</categories>
+ <technologies>Android</technologies>
+ <languages>Java</languages>
+ <solutions>Mobile</solutions>
+ <level>BEGINNER</level>
+ <icon>Wearable/src/main/res/drawable-xhdpi/ic_launcher.png</icon>
+ <screenshots>
+ <img>screenshots/skeleton_wearable_app.png</img>
+ <img>screenshots/grid_view_pager.png</img>
+ <img>screenshots/dismiss_overlay.png</img>
+ <img>screenshots/delayed_confirmation.png</img>
+ </screenshots>
+ <api_refs>
+ <android>android.support.wearable.view.CardFragment</android>
+ <android>android.support.wearable.view.GridViewPager</android>
+ </api_refs>
+ <description>
+<![CDATA[
+This sample is a basic skeleton app which can be used as a starting point for wear development.
+]]>
+ </description>
+ <intro>
+<![CDATA[
+This sample is a mostly empty wearable app that implements a fullscreen activity
+conforming to Android Wear best practices. Included in the sample are examples of [GridViewPager][1],
+[DelayedConfirmationView][2], and [DismissOverlayView][3].
+
+Developers who require a fullscreen activity for
+their wearable app can use this sample as a starting point.
+
+[1]: https://developer.android.com/reference/com/google/android/support/wearable/view/GridViewPager.html
+[2]: https://developer.android.com/reference/com/google/android/support/wearable/view/DelayedConfirmationView.html
+[3]: https://developer.android.com/reference/com/google/android/support/wearable/view/DismissOverlayView.html
+]]>
+ </intro>
+ </metadata>
+</sample>