From aa3315d6b1b5be7ee313cff33402e76a2936d044 Mon Sep 17 00:00:00 2001 From: Luan Nguyen Date: Tue, 9 Jun 2015 10:35:27 -0700 Subject: docs: Update JavaDoc reference links for Create Wearable Apps class bug: 21723175 Change-Id: I3afc72be12e4c08b8dfa0380e315ef5709e2b27c --- docs/html/training/wearables/apps/creating.jd | 56 ++++++------ docs/html/training/wearables/apps/layouts.jd | 117 +++++++++++++++++++------- 2 files changed, 117 insertions(+), 56 deletions(-) diff --git a/docs/html/training/wearables/apps/creating.jd b/docs/html/training/wearables/apps/creating.jd index a8b5ec6..f1491e4 100644 --- a/docs/html/training/wearables/apps/creating.jd +++ b/docs/html/training/wearables/apps/creating.jd @@ -9,9 +9,9 @@ helpoutsWidget=true

This lesson teaches you to

  1. Update Your SDK
  2. -
  3. Set Up an Android Wear Emulator
  4. -
  5. Set Up an Android Wear Device
  6. +
  7. Set Up an Android Wear Emulator or Device
  8. Create a Project
  9. +
  10. Install the Wearable App
  11. Include the Correct Libraries
@@ -112,18 +112,20 @@ types of screen shapes, which is useful for testing.

  • Tap ADB Debugging to enable adb.
  • Connect the wearable to your machine through USB, so you can install apps directly to it - as you develop. A message appears on both the wearable and the Android Wear app prompting you to allow debugging.
  • -

    Note: If you can not connect your wearable to your machine via USB, - follow the directions on - Debugging over - Bluetooth. + as you develop. A message appears on both the wearable and the Android Wear app prompting you to + allow debugging. + +

    Note: If you can not connect your wearable + to your machine via USB, you can try + connecting over Bluetooth.

    +
  • On the Android Wear app, check Always allow from this computer and tap OK.
  • -

    The Android tool window on Android Studio shows the system log from the wearable. -The wearable should also be listed when you run the adb devices command.

    +

    The Android tool window on Android Studio shows the system log from the +wearable. The wearable should also be listed when you run the adb devices command.

    Create a Project

    @@ -147,18 +149,23 @@ Project. As you follow the wizard, enter the following information:

  • In the first Add an Activity window, add a blank activity for mobile.
  • In the second Add an Activity window, add a blank activity for Wear.
  • -

    When the wizard completes, Android Studio creates a new project with two modules, mobile and - wear. You now have a project for both your handheld and wearable apps that you can create activities, - services, custom layouts, and much more in. On the handheld app, you do most of the heavy lifting, - such as network communications, intensive processing, or tasks that require long - amounts of user interaction. When these are done, - you usually notify the wearable of the results through notifications or by syncing and sending - data to the wearable.

    - -

    Note: The wear module also contains a "Hello World" activity that uses a - WatchViewStub that inflates a layout based on whether the device's screen - is round or square. The WatchViewStub class is one of the UI widgets that's provided - by the wearable support library.

    +

    When the wizard completes, Android Studio creates a new project with two modules, mobile + and wear. You now have a project for both your handheld and wearable apps for which you can + create activities, services, and custom layouts. The handheld app does most of + the heavy lifting, such as network communications, intensive processing, or tasks that require + long amounts of user interaction. When the app completes these operations, your app should + notify the wearable of the results through notifications or by syncing and sending data to + the wearable.

    + +

    Note: The wear module also contains a "Hello World" activity that + uses a + WatchViewStub. + This class inflates a layout based on whether the device's screen is round or square. The + WatchViewStub + class is one of the UI widgets that the + wearable support library + provides. +

    Install the Wearable App

    @@ -167,8 +174,8 @@ Project. As you follow the wizard, enter the following information:

    either adb install or the Play button on Android Studio.

    When you're ready to publish your app to users, you embed the wearable app inside of the -handheld app. When users install the handheld app from Google Play, a connected wearable automatically -receives the wearable app.

    +handheld app. When a user installs the handheld app from Google Play, a connected wearable +automatically receives the wearable app.

    Note: The automatic installation of wearable apps does not work when you are signing apps with a debug key and only works with release keys. See @@ -184,7 +191,8 @@ wearable and prints out "Hello world!"

    As part of the Project Wizard, the correct dependencies are imported for you in the appropriate module's build.gradle file. -However, these dependencies are not required, so read the following descriptions to find out if you need them or not:

    +However, these dependencies are not required, so read the following descriptions to find out if you +need them or not:

    Notifications

    The Android diff --git a/docs/html/training/wearables/apps/layouts.jd b/docs/html/training/wearables/apps/layouts.jd index 1d0e49b..197b94b0c 100644 --- a/docs/html/training/wearables/apps/layouts.jd +++ b/docs/html/training/wearables/apps/layouts.jd @@ -10,7 +10,7 @@ helpoutsWidget=true

    This lesson teaches you to

    1. Create custom notifications
    2. -
    3. Create Layouts with the Wearable UI Library
    4. +
    5. Create Layouts with the Wearable UI Library

    You should also read

    @@ -73,8 +73,8 @@ public void onCreate(Bundle bundle){ For example:
     Intent notificationIntent = new Intent(this, NotificationActivity.class);
    -PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, 0, notificationIntent,
    -        PendingIntent.FLAG_UPDATE_CURRENT);
    +PendingIntent notificationPendingIntent = PendingIntent.getActivity(
    +        this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
     
  • Build a {@link android.app.Notification} and call @@ -110,35 +110,88 @@ dependencies {

    Here are some of the major classes in the Wearable UI Library:

    - +
    +
    BoxInsetLayout +
    +
    A {@link android.widget.FrameLayout} object + that's aware of screen shape and can box its children in the center square of a round screen. +
    + +
    CardFragment +
    +
    A fragment that presents content within an expandable, vertically scrollable card. +
    + +
    CircledImageView +
    +
    An image view surrounded by a circle. +
    + +
    ConfirmationActivity +
    +
    An activity that displays confirmation animations after the user completes an action. +
    + +
    CrossFadeDrawable +
    +
    A drawable that contains two child drawables and provides methods to directly adjust the blend + between the two. +
    + +
    DelayedConfirmationView +
    +
    A view that provides a circular countdown timer, typically used to automatically confirm an + operation after a short delay has elapsed. +
    + +
    DismissOverlayView +
    +
    A view for implementing long-press-to-dismiss. +
    + +
    GridViewPager +
    +
    A layout manager that allows the user to navigate both vertically and + horizontally through pages of data. You supply an implementation of a + GridPagerAdapter + instance to generate the pages that the view shows. +
    + +
    GridPagerAdapter +
    +
    An adapter that supplies pages to a + GridViewPager + object. +
    + +
    FragmentGridPagerAdapter +
    +
    An implementation of a + GridPagerAdapter + instance that represents each page as a fragment. +
    + +
    DotsPageIndicator +
    +
    A page indicator for a + GridViewPager + implementation that identifies the current page in relation to all available pages on the current + row. +
    + +
    WatchViewStub +
    +
    A class that can inflate a specific layout, depending on the shape of the device's screen. +
    + +
    WearableListView +
    +
    An alternative version of a {@link android.widget.ListView} + object that is optimized for ease of use on small screen wearable devices. It displays a + vertically scrollable list of items, and automatically snaps to the nearest item when the user + stops scrolling. +
    +

    Wear UI library API reference

    -- cgit v1.1