Home | History | Annotate | Download | only in WatchViewStub
      1 <p><b>About:</b> This sample demonstrates how to specify different layouts for round and rectangular
      2 screens. The layouts used in this sample are as follows:
      3     <ul>
      4         <li>Round:  The background is a blue/green ring surrounding red text.</li>
      5         <li>Rect:   The background is a blue/breen rounded rectangle with red text on top.</li>
      6     </ul>
      7 Additionally, a unique animation is played when the user clicks on the layout, depending on whether
      8 the screen is round or rectangular:
      9     <ul>
     10         <li>Round:  The layout rotates 360 degrees.</li>
     11         <li>Rect:   The layout shrinks to 70% and then grows back to 100%.</li>
     12     </ul>
     13 </p>
     14 <p><b>How to run:</b> Install the Wearable APK on the wearable, go to the voice menu (either by
     15 saying "OK Google" or tapping the home screen) and select the "Start..." option. Then, select
     16 "WatchViewStub Sample" from the submenu.</p>
     17 <p><b>Wearable APIs used:</b> WatchViewStub, DismissOverlayView</p>
     18 <p><b>Screenshots:</b>
     19     <figure>
     20         <img src="screenshots/watch_view_stub_round.png" alt="Round layout" width="180"
     21              height="180">
     22         <img src="screenshots/watch_view_stub_rectangular.png" alt="Rectangular layout" width="140"
     23              height="140">
     24         <figcaption>The layout that is inflated depends on the shape of your wearable.</figcaption>
     25     </figure>
     26 </p>
     27