Search code examples
androidwear-osandroid-wear-data-apiandroid-wear-notification

How to show the same layout in android wear and mobile at same time


I have a layout of some textviews.The textviews are changing depend on a timer.

I need to show this layout in mobile and android wear at same time.Please suggest me a solution


Solution

  • Here is the easy way:

    1. create a version of the layout for both mobile and Wear
    2. operate on the data (Model), not the layouts (Views). Sync the data using the normal Wear data layer routine and just put it into the layout

    The data layer tends to work really fast, so the effect should be just as you desired.