Game Development Reference
In-Depth Information
public static final class styleable {
public static final int[] BoxInsetLayout = { 0x7f010000 };
public static final int BoxInsetLayout_layout_box = 0;
public static final int[] CircledImageView = { 0x01010119, 0x7f010001,
0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007 };
public static final int CircledImageView_android_src = 0;
public static final int CircledImageView_circle_border_color = 5;
public static final int CircledImageView_circle_border_width = 4;
public static final int CircledImageView_circle_color = 1;
public static final int CircledImageView_circle_padding = 6;
public static final int CircledImageView_circle_radius = 2;
public static final int CircledImageView_circle_radius_pressed = 3;
public static final int CircledImageView_shadow_width = 7;
public static final int[] DelayedConfirmationView = { 0x7f010008 };
public static final int DelayedConfirmationView_update_interval = 0;
public static final int[] WatchViewStub = { 0x7f010009, 0x7f01000a };
public static final int WatchViewStub_rectLayout = 0;
public static final int WatchViewStub_roundLayout = 1;
}
}
This file mainly define all the classes like
class layout
and
class style
, which are used
when rendering the layout and style of the wearable application.
The next step is to look at the
project.properties
file. Since you used the wear reference
library
wear
created earlier, the
project.properties
file should look like this:
target=android-21
android.library.reference.1=../wear
Now you can take a look at the files under the folder “res” of the project. The first change
you want to make is to the file
styles.xml
, which will look like this:
<resources>
<!-- Application theme. -->
<style name="
AppTheme
" parent="
android:Theme.DeviceDefault
">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
information about styles and themes.
By utilizing this code, you'll use the default application theme for your project. Next, we'll
take a look at the
activity_my.xml
file. Listing 11-4 shows the code for this file.