August 2017
Beginner to intermediate
220 pages
4h 50m
English
The blank Wear activity template applies the first technique we discussed earlier for managing different device shapes. This takes the form of the WatchViewStub class, which can be found in the wear/src/main/res/layout folder.
<?xml version="1.0" encoding="utf-8"?> <android.support.wearable.view.WatchViewStub xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/watch_view_stub" android:layout_width="match_parent" android:layout_height="match_parent" app:rectLayout="@layout/rect_activity_main" app:roundLayout="@layout/round_activity_main" tools:context="com.mew.kyle.wearable.MainActivity" ...
Read now
Unlock full access