development
Revision | e63a4b58a26cdce8b62984c83763dafdf282895b (tree) |
---|---|
Time | 2011-01-17 07:29:28 |
Author | Dianne Hackborn <hackbod@goog...> |
Commiter | Dianne Hackborn |
Add some more API demos for themes.
Shows how to make a basic custom theme with a custom background,
and a theme that selects between the old theme and Holo.
Also use a little trick to make the API demos for HC specific
samples be hidden on older versions of the platform.
Change-Id: Ie53e8103147e81975fca73b96bda989a00504534
@@ -35,6 +35,8 @@ | ||
35 | 35 | <!-- For android.media.audiofx.Visualizer --> |
36 | 36 | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
37 | 37 | |
38 | + <uses-sdk android:minSdkVersion="4" /> | |
39 | + | |
38 | 40 | <!-- We will request access to the camera, saying we require a camera |
39 | 41 | of some sort but not one with autofocus capability. --> |
40 | 42 | <!-- |
@@ -152,7 +154,8 @@ | ||
152 | 154 | </activity> |
153 | 155 | |
154 | 156 | <activity android:name=".app.ActivityRecreate" |
155 | - android:label="@string/activity_recreate"> | |
157 | + android:label="@string/activity_recreate" | |
158 | + android:enabled="@bool/atLeastHoneycomb"> | |
156 | 159 | <intent-filter> |
157 | 160 | <action android:name="android.intent.action.MAIN" /> |
158 | 161 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -244,7 +247,8 @@ | ||
244 | 247 | <!-- Fragment Samples --> |
245 | 248 | |
246 | 249 | <activity android:name=".app.FragmentAlertDialog" |
247 | - android:label="@string/fragment_alert_dialog"> | |
250 | + android:label="@string/fragment_alert_dialog" | |
251 | + android:enabled="@bool/atLeastHoneycomb"> | |
248 | 252 | <intent-filter> |
249 | 253 | <action android:name="android.intent.action.MAIN" /> |
250 | 254 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -253,7 +257,8 @@ | ||
253 | 257 | |
254 | 258 | <activity android:name=".app.FragmentHideShow" |
255 | 259 | android:label="@string/fragment_hide_show" |
256 | - android:windowSoftInputMode="stateUnchanged"> | |
260 | + android:windowSoftInputMode="stateUnchanged" | |
261 | + android:enabled="@bool/atLeastHoneycomb"> | |
257 | 262 | <intent-filter> |
258 | 263 | <action android:name="android.intent.action.MAIN" /> |
259 | 264 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -261,7 +266,8 @@ | ||
261 | 266 | </activity> |
262 | 267 | |
263 | 268 | <activity android:name=".app.FragmentContextMenu" |
264 | - android:label="@string/fragment_context_menu"> | |
269 | + android:label="@string/fragment_context_menu" | |
270 | + android:enabled="@bool/atLeastHoneycomb"> | |
265 | 271 | <intent-filter> |
266 | 272 | <action android:name="android.intent.action.MAIN" /> |
267 | 273 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -269,7 +275,8 @@ | ||
269 | 275 | </activity> |
270 | 276 | |
271 | 277 | <activity android:name=".app.FragmentDialog" |
272 | - android:label="@string/fragment_dialog"> | |
278 | + android:label="@string/fragment_dialog" | |
279 | + android:enabled="@bool/atLeastHoneycomb"> | |
273 | 280 | <intent-filter> |
274 | 281 | <action android:name="android.intent.action.MAIN" /> |
275 | 282 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -277,7 +284,8 @@ | ||
277 | 284 | </activity> |
278 | 285 | |
279 | 286 | <activity android:name=".app.FragmentDialogOrActivity" |
280 | - android:label="@string/fragment_dialog_or_activity"> | |
287 | + android:label="@string/fragment_dialog_or_activity" | |
288 | + android:enabled="@bool/atLeastHoneycomb"> | |
281 | 289 | <intent-filter> |
282 | 290 | <action android:name="android.intent.action.MAIN" /> |
283 | 291 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -285,17 +293,20 @@ | ||
285 | 293 | </activity> |
286 | 294 | |
287 | 295 | <activity android:name=".app.FragmentLayout" |
288 | - android:label="@string/fragment_layout"> | |
296 | + android:label="@string/fragment_layout" | |
297 | + android:enabled="@bool/atLeastHoneycomb"> | |
289 | 298 | <intent-filter> |
290 | 299 | <action android:name="android.intent.action.MAIN" /> |
291 | 300 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
292 | 301 | </intent-filter> |
293 | 302 | </activity> |
294 | 303 | |
295 | - <activity android:name=".app.FragmentLayout$DetailsActivity" /> | |
304 | + <activity android:name=".app.FragmentLayout$DetailsActivity" | |
305 | + android:enabled="@bool/atLeastHoneycomb" /> | |
296 | 306 | |
297 | 307 | <activity android:name=".app.FragmentListCursorLoader" |
298 | - android:label="@string/fragment_list_cursor_loader"> | |
308 | + android:label="@string/fragment_list_cursor_loader" | |
309 | + android:enabled="@bool/atLeastHoneycomb"> | |
299 | 310 | <intent-filter> |
300 | 311 | <action android:name="android.intent.action.MAIN" /> |
301 | 312 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -303,7 +314,8 @@ | ||
303 | 314 | </activity> |
304 | 315 | |
305 | 316 | <activity android:name=".app.FragmentListArray" |
306 | - android:label="@string/fragment_list_array"> | |
317 | + android:label="@string/fragment_list_array" | |
318 | + android:enabled="@bool/atLeastHoneycomb"> | |
307 | 319 | <intent-filter> |
308 | 320 | <action android:name="android.intent.action.MAIN" /> |
309 | 321 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -311,7 +323,8 @@ | ||
311 | 323 | </activity> |
312 | 324 | |
313 | 325 | <activity android:name=".app.FragmentMenu" |
314 | - android:label="@string/fragment_menu"> | |
326 | + android:label="@string/fragment_menu" | |
327 | + android:enabled="@bool/atLeastHoneycomb"> | |
315 | 328 | <intent-filter> |
316 | 329 | <action android:name="android.intent.action.MAIN" /> |
317 | 330 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -319,7 +332,8 @@ | ||
319 | 332 | </activity> |
320 | 333 | |
321 | 334 | <activity android:name=".app.FragmentRetainInstance" |
322 | - android:label="@string/fragment_retain_instance"> | |
335 | + android:label="@string/fragment_retain_instance" | |
336 | + android:enabled="@bool/atLeastHoneycomb"> | |
323 | 337 | <intent-filter> |
324 | 338 | <action android:name="android.intent.action.MAIN" /> |
325 | 339 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -327,7 +341,8 @@ | ||
327 | 341 | </activity> |
328 | 342 | |
329 | 343 | <activity android:name=".app.FragmentReceiveResult" |
330 | - android:label="@string/fragment_receive_result"> | |
344 | + android:label="@string/fragment_receive_result" | |
345 | + android:enabled="@bool/atLeastHoneycomb"> | |
331 | 346 | <intent-filter> |
332 | 347 | <action android:name="android.intent.action.MAIN" /> |
333 | 348 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -335,7 +350,8 @@ | ||
335 | 350 | </activity> |
336 | 351 | |
337 | 352 | <activity android:name=".app.FragmentStack" |
338 | - android:label="@string/fragment_stack"> | |
353 | + android:label="@string/fragment_stack" | |
354 | + android:enabled="@bool/atLeastHoneycomb"> | |
339 | 355 | <intent-filter> |
340 | 356 | <action android:name="android.intent.action.MAIN" /> |
341 | 357 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -346,7 +362,8 @@ | ||
346 | 362 | |
347 | 363 | <!-- BEGIN_INCLUDE(loader_throttle) --> |
348 | 364 | <activity android:name=".app.LoaderThrottle" |
349 | - android:label="@string/loader_throttle"> | |
365 | + android:label="@string/loader_throttle" | |
366 | + android:enabled="@bool/atLeastHoneycomb"> | |
350 | 367 | <intent-filter> |
351 | 368 | <action android:name="android.intent.action.MAIN" /> |
352 | 369 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -719,14 +736,17 @@ | ||
719 | 736 | |
720 | 737 | <!-- Action Bar Samples --> |
721 | 738 | <activity android:name=".app.ActionBarMechanics" |
722 | - android:label="@string/action_bar_mechanics"> | |
739 | + android:label="@string/action_bar_mechanics" | |
740 | + android:enabled="@bool/atLeastHoneycomb"> | |
723 | 741 | <intent-filter> |
724 | 742 | <action android:name="android.intent.action.MAIN" /> |
725 | 743 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
726 | 744 | </intent-filter> |
727 | 745 | </activity> |
728 | 746 | |
729 | - <activity android:name=".app.ActionBarUsage" android:label="@string/action_bar_usage"> | |
747 | + <activity android:name=".app.ActionBarUsage" | |
748 | + android:label="@string/action_bar_usage" | |
749 | + android:enabled="@bool/atLeastHoneycomb"> | |
730 | 750 | <intent-filter> |
731 | 751 | <action android:name="android.intent.action.MAIN" /> |
732 | 752 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -734,8 +754,9 @@ | ||
734 | 754 | </activity> |
735 | 755 | |
736 | 756 | <activity android:name=".app.ActionBarDisplayOptions" |
737 | - android:label="@string/action_bar_display_options" | |
738 | - android:logo="@drawable/apidemo_androidlogo"> | |
757 | + android:label="@string/action_bar_display_options" | |
758 | + android:logo="@drawable/apidemo_androidlogo" | |
759 | + android:enabled="@bool/atLeastHoneycomb"> | |
739 | 760 | <intent-filter> |
740 | 761 | <action android:name="android.intent.action.MAIN" /> |
741 | 762 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -743,7 +764,8 @@ | ||
743 | 764 | </activity> |
744 | 765 | |
745 | 766 | <activity android:name=".app.ActionBarTabs" |
746 | - android:label="@string/action_bar_tabs"> | |
767 | + android:label="@string/action_bar_tabs" | |
768 | + android:enabled="@bool/atLeastHoneycomb"> | |
747 | 769 | <intent-filter> |
748 | 770 | <action android:name="android.intent.action.MAIN" /> |
749 | 771 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -755,7 +777,8 @@ | ||
755 | 777 | <!-- ************************************* --> |
756 | 778 | |
757 | 779 | <activity android:name=".preference.FragmentPreferences" |
758 | - android:label="@string/fragment_preferences"> | |
780 | + android:label="@string/fragment_preferences" | |
781 | + android:enabled="@bool/atLeastHoneycomb"> | |
759 | 782 | <intent-filter> |
760 | 783 | <action android:name="android.intent.action.MAIN" /> |
761 | 784 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -763,7 +786,8 @@ | ||
763 | 786 | </activity> |
764 | 787 | |
765 | 788 | <activity android:name=".preference.PreferenceWithHeaders" |
766 | - android:label="@string/preference_with_headers"> | |
789 | + android:label="@string/preference_with_headers" | |
790 | + android:enabled="@bool/atLeastHoneycomb"> | |
767 | 791 | <intent-filter> |
768 | 792 | <action android:name="android.intent.action.MAIN" /> |
769 | 793 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -821,7 +845,9 @@ | ||
821 | 845 | <!-- CONTENT PACKAGE SAMPLES --> |
822 | 846 | <!-- ************************************* --> |
823 | 847 | |
824 | - <activity android:name=".content.ClipboardSample" android:label="@string/activity_clipboard"> | |
848 | + <activity android:name=".content.ClipboardSample" | |
849 | + android:label="@string/activity_clipboard" | |
850 | + android:enabled="@bool/atLeastHoneycomb"> | |
825 | 851 | <intent-filter> |
826 | 852 | <action android:name="android.intent.action.MAIN" /> |
827 | 853 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -912,8 +938,10 @@ | ||
912 | 938 | <!-- ANDROID.ANIMATION PACKAGE SAMPLES --> |
913 | 939 | <!-- ************************************* --> |
914 | 940 | |
915 | - <activity android:name=".animation.AnimationLoading" android:label="Animation/Loading" | |
916 | - android:hardwareAccelerated="false"> | |
941 | + <activity android:name=".animation.AnimationLoading" | |
942 | + android:label="Animation/Loading" | |
943 | + android:hardwareAccelerated="false" | |
944 | + android:enabled="@bool/atLeastHoneycomb"> | |
917 | 945 | <intent-filter> |
918 | 946 | <action android:name="android.intent.action.MAIN" /> |
919 | 947 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -921,24 +949,29 @@ | ||
921 | 949 | </activity> |
922 | 950 | |
923 | 951 | <activity android:name=".animation.AnimationCloning" |
924 | - android:label="Animation/Cloning" | |
925 | - android:hardwareAccelerated="false"> | |
952 | + android:label="Animation/Cloning" | |
953 | + android:hardwareAccelerated="false" | |
954 | + android:enabled="@bool/atLeastHoneycomb"> | |
926 | 955 | <intent-filter> |
927 | 956 | <action android:name="android.intent.action.MAIN" /> |
928 | 957 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
929 | 958 | </intent-filter> |
930 | 959 | </activity> |
931 | 960 | |
932 | - <activity android:name=".animation.AnimationSeeking" android:label="Animation/Seeking" | |
933 | - android:hardwareAccelerated="false"> | |
961 | + <activity android:name=".animation.AnimationSeeking" | |
962 | + android:label="Animation/Seeking" | |
963 | + android:hardwareAccelerated="false" | |
964 | + android:enabled="@bool/atLeastHoneycomb"> | |
934 | 965 | <intent-filter> |
935 | 966 | <action android:name="android.intent.action.MAIN" /> |
936 | 967 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
937 | 968 | </intent-filter> |
938 | 969 | </activity> |
939 | 970 | |
940 | - <activity android:name=".animation.AnimatorEvents" android:label="Animation/Events" | |
941 | - android:hardwareAccelerated="false"> | |
971 | + <activity android:name=".animation.AnimatorEvents" | |
972 | + android:label="Animation/Events" | |
973 | + android:hardwareAccelerated="false" | |
974 | + android:enabled="@bool/atLeastHoneycomb"> | |
942 | 975 | <intent-filter> |
943 | 976 | <action android:name="android.intent.action.MAIN" /> |
944 | 977 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -946,8 +979,9 @@ | ||
946 | 979 | </activity> |
947 | 980 | |
948 | 981 | <activity android:name=".animation.BouncingBalls" |
949 | - android:label="Animation/Bouncing Balls" | |
950 | - android:hardwareAccelerated="false"> | |
982 | + android:label="Animation/Bouncing Balls" | |
983 | + android:hardwareAccelerated="false" | |
984 | + android:enabled="@bool/atLeastHoneycomb"> | |
951 | 985 | <intent-filter> |
952 | 986 | <action android:name="android.intent.action.MAIN" /> |
953 | 987 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -955,23 +989,28 @@ | ||
955 | 989 | </activity> |
956 | 990 | |
957 | 991 | <activity android:name=".animation.CustomEvaluator" |
958 | - android:label="Animation/Custom Evaluator" | |
959 | - android:hardwareAccelerated="false"> | |
992 | + android:label="Animation/Custom Evaluator" | |
993 | + android:hardwareAccelerated="false" | |
994 | + android:enabled="@bool/atLeastHoneycomb"> | |
960 | 995 | <intent-filter> |
961 | 996 | <action android:name="android.intent.action.MAIN" /> |
962 | 997 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
963 | 998 | </intent-filter> |
964 | 999 | </activity> |
965 | 1000 | |
966 | - <activity android:name=".animation.ListFlipper" android:label="Animation/View Flip"> | |
1001 | + <activity android:name=".animation.ListFlipper" | |
1002 | + android:label="Animation/View Flip" | |
1003 | + android:enabled="@bool/atLeastHoneycomb"> | |
967 | 1004 | <intent-filter> |
968 | 1005 | <action android:name="android.intent.action.MAIN" /> |
969 | 1006 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
970 | 1007 | </intent-filter> |
971 | 1008 | </activity> |
972 | 1009 | |
973 | - <activity android:name=".animation.ReversingAnimation" android:label="Animation/Reversing" | |
974 | - android:hardwareAccelerated="false"> | |
1010 | + <activity android:name=".animation.ReversingAnimation" | |
1011 | + android:label="Animation/Reversing" | |
1012 | + android:hardwareAccelerated="false" | |
1013 | + android:enabled="@bool/atLeastHoneycomb"> | |
975 | 1014 | <intent-filter> |
976 | 1015 | <action android:name="android.intent.action.MAIN" /> |
977 | 1016 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -979,8 +1018,9 @@ | ||
979 | 1018 | </activity> |
980 | 1019 | |
981 | 1020 | <activity android:name=".animation.MultiPropertyAnimation" |
982 | - android:label="Animation/Multiple Properties" | |
983 | - android:hardwareAccelerated="false"> | |
1021 | + android:label="Animation/Multiple Properties" | |
1022 | + android:hardwareAccelerated="false" | |
1023 | + android:enabled="@bool/atLeastHoneycomb"> | |
984 | 1024 | <intent-filter> |
985 | 1025 | <action android:name="android.intent.action.MAIN" /> |
986 | 1026 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -988,7 +1028,8 @@ | ||
988 | 1028 | </activity> |
989 | 1029 | |
990 | 1030 | <activity android:name=".animation.LayoutAnimations" |
991 | - android:label="Animation/Layout Animations"> | |
1031 | + android:label="Animation/Layout Animations" | |
1032 | + android:enabled="@bool/atLeastHoneycomb"> | |
992 | 1033 | <intent-filter> |
993 | 1034 | <action android:name="android.intent.action.MAIN" /> |
994 | 1035 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -996,7 +1037,8 @@ | ||
996 | 1037 | </activity> |
997 | 1038 | |
998 | 1039 | <activity android:name=".animation.LayoutAnimationsHideShow" |
999 | - android:label="Animation/Hide-Show Animations"> | |
1040 | + android:label="Animation/Hide-Show Animations" | |
1041 | + android:enabled="@bool/atLeastHoneycomb"> | |
1000 | 1042 | <intent-filter> |
1001 | 1043 | <action android:name="android.intent.action.MAIN" /> |
1002 | 1044 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -1004,7 +1046,8 @@ | ||
1004 | 1046 | </activity> |
1005 | 1047 | |
1006 | 1048 | <activity android:name=".animation.LayoutAnimationsByDefault" |
1007 | - android:label="Animation/Default Layout Animations"> | |
1049 | + android:label="Animation/Default Layout Animations" | |
1050 | + android:enabled="@bool/atLeastHoneycomb"> | |
1008 | 1051 | <intent-filter> |
1009 | 1052 | <action android:name="android.intent.action.MAIN" /> |
1010 | 1053 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -1684,7 +1727,8 @@ | ||
1684 | 1727 | |
1685 | 1728 | <activity android:name=".view.Controls3" |
1686 | 1729 | android:label="Views/Controls/3. Holo Light Theme" |
1687 | - android:theme="@android:style/Theme.Holo.Light"> | |
1730 | + android:theme="@android:style/Theme.Holo.Light" | |
1731 | + android:enabled="@bool/atLeastHoneycomb"> | |
1688 | 1732 | <intent-filter> |
1689 | 1733 | <action android:name="android.intent.action.MAIN" /> |
1690 | 1734 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -1693,7 +1737,26 @@ | ||
1693 | 1737 | |
1694 | 1738 | <activity android:name=".view.Controls4" |
1695 | 1739 | android:label="Views/Controls/4. Holo Dark Theme" |
1696 | - android:theme="@android:style/Theme.Holo"> | |
1740 | + android:theme="@android:style/Theme.Holo" | |
1741 | + android:enabled="@bool/atLeastHoneycomb"> | |
1742 | + <intent-filter> | |
1743 | + <action android:name="android.intent.action.MAIN" /> | |
1744 | + <category android:name="android.intent.category.SAMPLE_CODE" /> | |
1745 | + </intent-filter> | |
1746 | + </activity> | |
1747 | + | |
1748 | + <activity android:name=".view.Controls5" | |
1749 | + android:label="Views/Controls/5. Custom Theme" | |
1750 | + android:theme="@style/CustomTheme"> | |
1751 | + <intent-filter> | |
1752 | + <action android:name="android.intent.action.MAIN" /> | |
1753 | + <category android:name="android.intent.category.SAMPLE_CODE" /> | |
1754 | + </intent-filter> | |
1755 | + </activity> | |
1756 | + | |
1757 | + <activity android:name=".view.Controls6" | |
1758 | + android:label="Views/Controls/6. Holo or Old Theme" | |
1759 | + android:theme="@style/ThemeHolo"> | |
1697 | 1760 | <intent-filter> |
1698 | 1761 | <action android:name="android.intent.action.MAIN" /> |
1699 | 1762 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -1889,7 +1952,8 @@ | ||
1889 | 1952 | |
1890 | 1953 | <activity android:name=".view.DragAndDropDemo" |
1891 | 1954 | android:label="Views/Drag and Drop" |
1892 | - android:hardwareAccelerated="false"> | |
1955 | + android:hardwareAccelerated="false" | |
1956 | + android:enabled="@bool/atLeastHoneycomb"> | |
1893 | 1957 | <intent-filter> |
1894 | 1958 | <action android:name="android.intent.action.MAIN" /> |
1895 | 1959 | <category android:name="android.intent.category.SAMPLE_CODE" /> |
@@ -139,6 +139,14 @@ | ||
139 | 139 | android:text="@string/listSeparatorTextViewStyle" |
140 | 140 | android:layout_marginTop="5dip" |
141 | 141 | /> |
142 | + | |
143 | + <TextView | |
144 | + android:layout_height="wrap_content" | |
145 | + android:layout_width="wrap_content" | |
146 | + android:layout_marginTop="400dip" | |
147 | + android:textAppearance="?android:attr/textAppearanceLarge" | |
148 | + android:text="(And all inside of a ScrollView!)" | |
149 | + /> | |
142 | 150 | |
143 | 151 | </LinearLayout> |
144 | 152 |
@@ -0,0 +1,20 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- Copyright (C) 2011 The Android Open Source Project | |
3 | + | |
4 | + Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + you may not use this file except in compliance with the License. | |
6 | + You may obtain a copy of the License at | |
7 | + | |
8 | + http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + | |
10 | + Unless required by applicable law or agreed to in writing, software | |
11 | + distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + See the License for the specific language governing permissions and | |
14 | + limitations under the License. | |
15 | +--> | |
16 | + | |
17 | +<resources> | |
18 | + <!-- True if running under Honeycomb or later. --> | |
19 | + <bool name="atLeastHoneycomb">true</bool> | |
20 | +</resources> |
@@ -0,0 +1,21 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- Copyright (C) 2011 The Android Open Source Project | |
3 | + | |
4 | + Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + you may not use this file except in compliance with the License. | |
6 | + You may obtain a copy of the License at | |
7 | + | |
8 | + http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + | |
10 | + Unless required by applicable law or agreed to in writing, software | |
11 | + distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + See the License for the specific language governing permissions and | |
14 | + limitations under the License. | |
15 | +--> | |
16 | + | |
17 | +<resources> | |
18 | + <!-- For API level 11 or later, the Holo theme is available and we prefer that. --> | |
19 | + <style name="ThemeHolo" parent="android:Theme.Holo"> | |
20 | + </style> | |
21 | +</resources> |
@@ -0,0 +1,22 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- Copyright (C) 2011 The Android Open Source Project | |
3 | + | |
4 | + Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + you may not use this file except in compliance with the License. | |
6 | + You may obtain a copy of the License at | |
7 | + | |
8 | + http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + | |
10 | + Unless required by applicable law or agreed to in writing, software | |
11 | + distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + See the License for the specific language governing permissions and | |
14 | + limitations under the License. | |
15 | +--> | |
16 | + | |
17 | +<resources> | |
18 | + <!-- This resource is true if running under at least Honeycomb's | |
19 | + API level. The default value is false; an alternative value | |
20 | + for Honeycomb is true. --> | |
21 | + <bool name="atLeastHoneycomb">false</bool> | |
22 | +</resources> |
@@ -15,6 +15,21 @@ | ||
15 | 15 | --> |
16 | 16 | |
17 | 17 | <resources> |
18 | + <!-- A custom theme that is a variation on the light them with a different | |
19 | + background color. --> | |
20 | + <color name="custom_theme_color">#b0b0ff</color> | |
21 | + <style name="CustomTheme" parent="android:Theme.Light"> | |
22 | + <item name="android:windowBackground">@color/custom_theme_color</item> | |
23 | + <item name="android:colorBackground">@color/custom_theme_color</item> | |
24 | + </style> | |
25 | + | |
26 | + <!-- This is a theme that will adjust itself depending on the API version. | |
27 | + The default definition is the safe one, using a theme that has always | |
28 | + been defined. Look at values-11/styles.xml for a variation that is | |
29 | + selected when the holographic theme is available. --> | |
30 | + <style name="ThemeHolo" parent="android:Theme"> | |
31 | + </style> | |
32 | + | |
18 | 33 | <!-- Base application theme is the default theme. --> |
19 | 34 | <style name="Theme" parent="android:Theme"> |
20 | 35 | </style> |
@@ -0,0 +1,19 @@ | ||
1 | +/* | |
2 | + * Copyright (C) 2011 The Android Open Source Project | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | + */ | |
16 | + | |
17 | +package com.example.android.apis.view; | |
18 | + | |
19 | +public class Controls5 extends Controls1 {} |
@@ -0,0 +1,19 @@ | ||
1 | +/* | |
2 | + * Copyright (C) 2011 The Android Open Source Project | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | + */ | |
16 | + | |
17 | +package com.example.android.apis.view; | |
18 | + | |
19 | +public class Controls6 extends Controls1 {} |
@@ -259,21 +259,31 @@ | ||
259 | 259 | |
260 | 260 | <h3>Controls</h3> |
261 | 261 | <dl> |
262 | - <dt><a href="Controls1.html">1. Theme Light</a></dt> | |
262 | + <dt><a href="Controls1.html">1. Light Theme</a></dt> | |
263 | 263 | <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using the light theme. </dd> |
264 | 264 | </dl> |
265 | 265 | <dl> |
266 | - <dt><a href="Controls1.html">2. Theme Dark</a></dt> | |
266 | + <dt><a href="Controls1.html">2. Dark Theme</a></dt> | |
267 | 267 | <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using the dark theme. </dd> |
268 | 268 | </dl> |
269 | 269 | <dl> |
270 | - <dt><a href="Controls1.html">3. Theme Holographic Light</a></dt> | |
270 | + <dt><a href="Controls1.html">3. Holographic Light Theme</a></dt> | |
271 | 271 | <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using the light holographic theme. </dd> |
272 | 272 | </dl> |
273 | 273 | <dl> |
274 | - <dt><a href="Controls1.html">4. Theme Holographic Dark</a></dt> | |
274 | + <dt><a href="Controls1.html">4. Holographic Dark Theme</a></dt> | |
275 | 275 | <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using the dark holographic theme. </dd> |
276 | 276 | </dl> |
277 | +<dl> | |
278 | + <dt><a href="Controls1.html">5. Custom Theme</a></dt> | |
279 | + <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using a custom | |
280 | + theme based on the light theme. </dd> | |
281 | +</dl> | |
282 | +<dl> | |
283 | + <dt><a href="Controls1.html">6. Holo or Old Theme</a></dt> | |
284 | + <dd>Demonstrates a variety of common form type widgets, such as check boxes and radio buttons using a custom | |
285 | + theme that uses either the traditional or holo theme depending on the version of the platform. </dd> | |
286 | +</dl> | |
277 | 287 | |
278 | 288 | <h3>Auto Complete</h3> |
279 | 289 | <dl> |