Game Development Reference
In-Depth Information
stub.setOnLayoutInflatedListener(new WatchViewStub.
OnLayoutInflatedListener() {
public void onLayoutInflated(WatchViewStub stub) {
mTextView = (TextView) stub.findViewById(R.id.text);
}
});
}
}
You updated the ProjectActivity.java file by adding the wearable library:
import android.support.wearable.view.WatchViewStub;
Now you need to call the onCreate method so that the screen content will be updated with
the new value.
mTextView = (TextView) stub.findViewById(R.id. text
Every time you add a wearable support library to the project, a file will be automatically
added to the project as well. In this case it is called R.java . Listing 11-3 shows the code for
this file.
Listing 11-3. R.java for This Chapter's Example
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package android.support.wearable;
public final class R {
public static final class attr {
public static final int circle_border_color = 0x7f010005;
public static final int circle_border_width = 0x7f010004;
public static final int circle_color = 0x7f010001;
public static final int circle_padding = 0x7f010006;
public static final int circle_radius = 0x7f010002;
public static final int circle_radius_pressed = 0x7f010003;
public static final int layout_box = 0x7f010000;
public static final int rectLayout = 0x7f010009;
public static final int roundLayout = 0x7f01000a;
public static final int shadow_width = 0x7f010007;
public static final int update_interval = 0x7f010008;
}
public static final class color {
public static final int black = 0x7f040000;
public static final int blue = 0x7f040001;
public static final int dark_blue = 0x7f040002;
public static final int disabled_text_light = 0x7f040003;
public static final int dismiss_close = 0x7f040004;
 
Search WWH ::




Custom Search