diff options
Diffstat (limited to 'tutorials/MoarRam/res')
-rw-r--r-- | tutorials/MoarRam/res/drawable-hdpi/ic_launcher.png | bin | 0 -> 7658 bytes | |||
-rw-r--r-- | tutorials/MoarRam/res/drawable-mdpi/ic_launcher.png | bin | 0 -> 3777 bytes | |||
-rw-r--r-- | tutorials/MoarRam/res/drawable-xhdpi/ic_launcher.png | bin | 0 -> 12516 bytes | |||
-rw-r--r-- | tutorials/MoarRam/res/drawable-xxhdpi/ic_launcher.png | bin | 0 -> 24777 bytes | |||
-rw-r--r-- | tutorials/MoarRam/res/layout/activity_main.xml | 104 | ||||
-rw-r--r-- | tutorials/MoarRam/res/menu/main.xml | 9 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values-sw600dp/dimens.xml | 8 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values-sw720dp-land/dimens.xml | 9 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values-v11/styles.xml | 11 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values-v14/styles.xml | 12 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values/dimens.xml | 7 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values/strings.xml | 16 | ||||
-rw-r--r-- | tutorials/MoarRam/res/values/styles.xml | 20 |
13 files changed, 196 insertions, 0 deletions
diff --git a/tutorials/MoarRam/res/drawable-hdpi/ic_launcher.png b/tutorials/MoarRam/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..288b66551 --- /dev/null +++ b/tutorials/MoarRam/res/drawable-hdpi/ic_launcher.png diff --git a/tutorials/MoarRam/res/drawable-mdpi/ic_launcher.png b/tutorials/MoarRam/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..6ae570b4d --- /dev/null +++ b/tutorials/MoarRam/res/drawable-mdpi/ic_launcher.png diff --git a/tutorials/MoarRam/res/drawable-xhdpi/ic_launcher.png b/tutorials/MoarRam/res/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..d4fb7cd9d --- /dev/null +++ b/tutorials/MoarRam/res/drawable-xhdpi/ic_launcher.png diff --git a/tutorials/MoarRam/res/drawable-xxhdpi/ic_launcher.png b/tutorials/MoarRam/res/drawable-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..85a608158 --- /dev/null +++ b/tutorials/MoarRam/res/drawable-xxhdpi/ic_launcher.png diff --git a/tutorials/MoarRam/res/layout/activity_main.xml b/tutorials/MoarRam/res/layout/activity_main.xml new file mode 100644 index 000000000..8319bd76e --- /dev/null +++ b/tutorials/MoarRam/res/layout/activity_main.xml @@ -0,0 +1,104 @@ +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="fill_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + android:orientation="vertical" + tools:context=".MainActivity" > + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="horizontal"> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/add_32" + android:layout_weight="1" + android:onClick="add32ByteBlocks" /> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/free_32" + android:layout_weight="1" + android:onClick="free32ByteBlocks" /> + </LinearLayout> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="horizontal"> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/add_2m" + android:layout_weight="1" + android:onClick="add2MByteBlocks" /> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/free_2m" + android:layout_weight="1" + android:onClick="free2MByteBlocks" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/linearLayout2" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="horizontal"> + + <RadioGroup + android:id="@+id/blockSize" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:orientation="horizontal" + android:gravity="center" > + + <RadioButton + android:id="@+id/radio17" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/_17byte" + android:checked="true" /> + + <RadioButton + android:id="@+id/radio71" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/_71byte" /> + </RadioGroup> + </LinearLayout> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="horizontal"> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/add_variable" + android:layout_weight="1" + android:onClick="addVariableSizedBlocks" /> + + <Button + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:text="@string/free_variable" + android:layout_weight="1" + android:onClick="freeVariableSizedBlocks" /> + </LinearLayout> +</LinearLayout> diff --git a/tutorials/MoarRam/res/menu/main.xml b/tutorials/MoarRam/res/menu/main.xml new file mode 100644 index 000000000..d227c4927 --- /dev/null +++ b/tutorials/MoarRam/res/menu/main.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values-sw600dp/dimens.xml b/tutorials/MoarRam/res/values-sw600dp/dimens.xml new file mode 100644 index 000000000..1ba777d65 --- /dev/null +++ b/tutorials/MoarRam/res/values-sw600dp/dimens.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- + Customize dimensions originally defined in res/values/dimens.xml (such as + screen margins) for sw600dp devices (e.g. 7" tablets) here. + --> + +</resources>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values-sw720dp-land/dimens.xml b/tutorials/MoarRam/res/values-sw720dp-land/dimens.xml new file mode 100644 index 000000000..eee741a51 --- /dev/null +++ b/tutorials/MoarRam/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,9 @@ +<resources> + + <!-- + Customize dimensions originally defined in res/values/dimens.xml (such as + screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. + --> + <dimen name="activity_horizontal_margin">128dp</dimen> + +</resources>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values-v11/styles.xml b/tutorials/MoarRam/res/values-v11/styles.xml new file mode 100644 index 000000000..541752f6e --- /dev/null +++ b/tutorials/MoarRam/res/values-v11/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> + <!-- API 11 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values-v14/styles.xml b/tutorials/MoarRam/res/values-v14/styles.xml new file mode 100644 index 000000000..f20e01501 --- /dev/null +++ b/tutorials/MoarRam/res/values-v14/styles.xml @@ -0,0 +1,12 @@ +<resources> + + <!-- + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- API 14 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values/dimens.xml b/tutorials/MoarRam/res/values/dimens.xml new file mode 100644 index 000000000..a6dd14032 --- /dev/null +++ b/tutorials/MoarRam/res/values/dimens.xml @@ -0,0 +1,7 @@ +<resources> + + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> + +</resources>
\ No newline at end of file diff --git a/tutorials/MoarRam/res/values/strings.xml b/tutorials/MoarRam/res/values/strings.xml new file mode 100644 index 000000000..0c0031dea --- /dev/null +++ b/tutorials/MoarRam/res/values/strings.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">MoarRam</string> + <string name="action_settings">Settings</string> + <string name="hello_world">Hello world!</string> + <string name="enter_num">Enter a number</string> + <string name="add_32">Add 32 bytes</string> + <string name="free_32">Free 32 bytes</string> + <string name="add_2m">Add 2M bytes</string> + <string name="free_2m">Free 2M bytes</string> + <string name="add_variable">Add 17 or 71 bytes</string> + <string name="free_variable">Free 17 or 71 bytes</string> + <string name="_17byte">17 bytes</string> + <string name="_71byte">71 bytes</string> +</resources> diff --git a/tutorials/MoarRam/res/values/styles.xml b/tutorials/MoarRam/res/values/styles.xml new file mode 100644 index 000000000..4a10ca492 --- /dev/null +++ b/tutorials/MoarRam/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources>
\ No newline at end of file |