summaryrefslogtreecommitdiffstats
path: root/samples/browseable/RenderScriptIntrinsic/res
diff options
context:
space:
mode:
authorAlexander Lucas <alexlucas@google.com>2014-02-06 15:38:51 -0800
committerAlexander Lucas <alexlucas@google.com>2014-02-07 13:17:23 -0800
commit0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5 (patch)
tree8a092424bc4793e2daa6b5f62d2b081050774fff /samples/browseable/RenderScriptIntrinsic/res
parent01d72b37a87ce8781cd35d5aaa834b508f964be7 (diff)
downloadandroid_development-0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5.tar.gz
android_development-0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5.tar.bz2
android_development-0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5.zip
Adding new samples to browseable section of DAC
Change-Id: I58e10e787f5df668331fc04e97a6c2efcd75f76f
Diffstat (limited to 'samples/browseable/RenderScriptIntrinsic/res')
-rwxr-xr-xsamples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/ic_launcher.pngbin0 -> 4440 bytes
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/tile.9.pngbin0 -> 196 bytes
-rwxr-xr-xsamples/browseable/RenderScriptIntrinsic/res/drawable-mdpi/ic_launcher.pngbin0 -> 2742 bytes
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/drawable-nodpi/data.jpgbin0 -> 777765 bytes
-rwxr-xr-xsamples/browseable/RenderScriptIntrinsic/res/drawable-xhdpi/ic_launcher.pngbin0 -> 6245 bytes
-rwxr-xr-xsamples/browseable/RenderScriptIntrinsic/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 11130 bytes
-rwxr-xr-xsamples/browseable/RenderScriptIntrinsic/res/layout/activity_main.xml36
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/layout/main_layout.xml51
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-dimens.xml24
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-styles.xml25
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values-v11/styles.xml24
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values-v14/styles.xml12
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/attrs.xml14
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/base-strings.xml33
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/colors.xml5
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/styles.xml33
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/template-dimens.xml32
-rw-r--r--samples/browseable/RenderScriptIntrinsic/res/values/template-styles.xml42
18 files changed, 331 insertions, 0 deletions
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/ic_launcher.png b/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/ic_launcher.png
new file mode 100755
index 000000000..75b3c9781
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/tile.9.png b/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/tile.9.png
new file mode 100644
index 000000000..135862883
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-hdpi/tile.9.png
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-mdpi/ic_launcher.png b/samples/browseable/RenderScriptIntrinsic/res/drawable-mdpi/ic_launcher.png
new file mode 100755
index 000000000..4ccd98e09
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-nodpi/data.jpg b/samples/browseable/RenderScriptIntrinsic/res/drawable-nodpi/data.jpg
new file mode 100644
index 000000000..48e48e61b
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-nodpi/data.jpg
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-xhdpi/ic_launcher.png b/samples/browseable/RenderScriptIntrinsic/res/drawable-xhdpi/ic_launcher.png
new file mode 100755
index 000000000..7c5aeed04
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/drawable-xxhdpi/ic_launcher.png b/samples/browseable/RenderScriptIntrinsic/res/drawable-xxhdpi/ic_launcher.png
new file mode 100755
index 000000000..3c45f511e
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/samples/browseable/RenderScriptIntrinsic/res/layout/activity_main.xml b/samples/browseable/RenderScriptIntrinsic/res/layout/activity_main.xml
new file mode 100755
index 000000000..be1aa49d9
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/layout/activity_main.xml
@@ -0,0 +1,36 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <LinearLayout style="@style/Widget.SampleMessageTile"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView style="@style/Widget.SampleMessage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/horizontal_page_margin"
+ android:layout_marginRight="@dimen/horizontal_page_margin"
+ android:layout_marginTop="@dimen/vertical_page_margin"
+ android:layout_marginBottom="@dimen/vertical_page_margin"
+ android:text="@string/intro_message" />
+ </LinearLayout>
+</LinearLayout>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/layout/main_layout.xml b/samples/browseable/RenderScriptIntrinsic/res/layout/main_layout.xml
new file mode 100644
index 000000000..13516d8c2
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/layout/main_layout.xml
@@ -0,0 +1,51 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#0099cc"
+ tools:context=".MainActivity">
+
+ <ImageView
+ android:id="@+id/imageView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"
+ android:src="@drawable/data" />
+
+ <RadioGroup
+ android:id="@+id/radioGroup1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:orientation="horizontal"
+ android:layout_above="@+id/seekBar1"
+ android:layout_marginBottom="8dp">
+
+ <com.example.android.renderscriptintrinsic.ThumbnailRadioButton
+ android:id="@+id/radio0"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="true"
+ android:text="Blur" />
+
+ <com.example.android.renderscriptintrinsic.ThumbnailRadioButton
+ android:id="@+id/radio1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Emboss" />
+
+ <com.example.android.renderscriptintrinsic.ThumbnailRadioButton
+ android:id="@+id/radio2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Hue" />
+ </RadioGroup>
+
+ <SeekBar
+ android:id="@+id/seekBar1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_marginBottom="16dp" />
+
+</RelativeLayout>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-dimens.xml b/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-dimens.xml
new file mode 100644
index 000000000..22074a2bd
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-dimens.xml
@@ -0,0 +1,24 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+
+ <!-- Semantic definitions -->
+
+ <dimen name="horizontal_page_margin">@dimen/margin_huge</dimen>
+ <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-styles.xml b/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-styles.xml
new file mode 100644
index 000000000..03d197418
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values-sw600dp/template-styles.xml
@@ -0,0 +1,25 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+
+ <style name="Widget.SampleMessage">
+ <item name="android:textAppearance">?android:textAppearanceLarge</item>
+ <item name="android:lineSpacingMultiplier">1.2</item>
+ <item name="android:shadowDy">-6.5</item>
+ </style>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values-v11/styles.xml b/samples/browseable/RenderScriptIntrinsic/res/values-v11/styles.xml
new file mode 100644
index 000000000..f3a90c687
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values-v11/styles.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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>
+
+ <style name="FullscreenTheme" parent="android:Theme.Holo">
+ <item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item>
+ <item name="android:windowActionBarOverlay">true</item>
+ <item name="android:windowBackground">@null</item>
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+ <style name="FullscreenActionBarStyle" parent="android:Widget.Holo.ActionBar">
+ <item name="android:background">@color/black_overlay</item>
+ </style>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values-v14/styles.xml b/samples/browseable/RenderScriptIntrinsic/res/values-v14/styles.xml
new file mode 100644
index 000000000..a91fd0372
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/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>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/attrs.xml b/samples/browseable/RenderScriptIntrinsic/res/values/attrs.xml
new file mode 100644
index 000000000..e67df0a37
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/attrs.xml
@@ -0,0 +1,14 @@
+<resources>
+
+ <!--
+ Declare custom theme attributes that allow changing which styles are
+ used for button bars depending on the API level.
+ ?android:attr/buttonBarStyle is new as of API 11 so this is
+ necessary to support previous API levels.
+ -->
+ <declare-styleable name="ButtonBarContainerTheme">
+ <attr name="buttonBarStyle" format="reference" />
+ <attr name="buttonBarButtonStyle" format="reference" />
+ </declare-styleable>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/base-strings.xml b/samples/browseable/RenderScriptIntrinsic/res/values/base-strings.xml
new file mode 100644
index 000000000..c8488beed
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/base-strings.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+
+<resources>
+ <string name="app_name">RenderScriptIntrinsic</string>
+ <string name="intro_message">
+ <![CDATA[
+
+
+ RenderScriptIntrinsic sample that demonstrates how to use RenderScript intrinsics.
+ Creates several RenderScript intrinsics and shows a filtering result with various parameters.
+ Also shows how to extends RedioButton with StateListDrawable.
+
+
+ ]]>
+ </string>
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/colors.xml b/samples/browseable/RenderScriptIntrinsic/res/values/colors.xml
new file mode 100644
index 000000000..327c0604c
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/colors.xml
@@ -0,0 +1,5 @@
+<resources>
+
+ <color name="black_overlay">#66000000</color>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/styles.xml b/samples/browseable/RenderScriptIntrinsic/res/values/styles.xml
new file mode 100644
index 000000000..12eb93028
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/styles.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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>
+
+ <style name="FullscreenTheme" parent="android:Theme.NoTitleBar">
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowBackground">@null</item>
+ <item name="buttonBarStyle">@style/ButtonBar</item>
+ <item name="buttonBarButtonStyle">@style/ButtonBarButton</item>
+ </style>
+
+ <style name="ButtonBar">
+ <item name="android:paddingLeft">2dp</item>
+ <item name="android:paddingTop">5dp</item>
+ <item name="android:paddingRight">2dp</item>
+ <item name="android:paddingBottom">0dp</item>
+ <item name="android:background">@android:drawable/bottom_bar</item>
+ </style>
+
+ <style name="ButtonBarButton" />
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/template-dimens.xml b/samples/browseable/RenderScriptIntrinsic/res/values/template-dimens.xml
new file mode 100644
index 000000000..39e710b5c
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/template-dimens.xml
@@ -0,0 +1,32 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+
+ <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+ <dimen name="margin_tiny">4dp</dimen>
+ <dimen name="margin_small">8dp</dimen>
+ <dimen name="margin_medium">16dp</dimen>
+ <dimen name="margin_large">32dp</dimen>
+ <dimen name="margin_huge">64dp</dimen>
+
+ <!-- Semantic definitions -->
+
+ <dimen name="horizontal_page_margin">@dimen/margin_medium</dimen>
+ <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/samples/browseable/RenderScriptIntrinsic/res/values/template-styles.xml b/samples/browseable/RenderScriptIntrinsic/res/values/template-styles.xml
new file mode 100644
index 000000000..404623e3d
--- /dev/null
+++ b/samples/browseable/RenderScriptIntrinsic/res/values/template-styles.xml
@@ -0,0 +1,42 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources>
+
+ <!-- Activity themes -->
+
+ <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+ <style name="Theme.Sample" parent="Theme.Base" />
+
+ <style name="AppTheme" parent="Theme.Sample" />
+ <!-- Widget styling -->
+
+ <style name="Widget" />
+
+ <style name="Widget.SampleMessage">
+ <item name="android:textAppearance">?android:textAppearanceMedium</item>
+ <item name="android:lineSpacingMultiplier">1.1</item>
+ </style>
+
+ <style name="Widget.SampleMessageTile">
+ <item name="android:background">@drawable/tile</item>
+ <item name="android:shadowColor">#7F000000</item>
+ <item name="android:shadowDy">-3.5</item>
+ <item name="android:shadowRadius">2</item>
+ </style>
+
+</resources>