Skip to content

Commit b63ce85

Browse files
committed
updates
1 parent 0e6eac2 commit b63ce85

48 files changed

Lines changed: 2763 additions & 124 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ApiDemos/.classpath‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="gen"/>
53
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
64
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="src" path="gen"/>
77
<classpathentry kind="output" path="bin/classes"/>
88
</classpath>

‎ApiDemos/AndroidManifest.xml‎

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<!-- For android.media.audiofx.Visualizer -->
3737
<uses-permission android:name="android.permission.RECORD_AUDIO" />
3838

39-
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14" />
39+
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />
4040

4141
<!-- We will request access to the camera, saying we require a camera
4242
of some sort but not one with autofocus capability. -->
@@ -47,7 +47,8 @@
4747
<application android:name="ApiDemosApplication"
4848
android:label="@string/activity_sample_code"
4949
android:icon="@drawable/app_sample_code"
50-
android:hardwareAccelerated="true">
50+
android:hardwareAccelerated="true"
51+
android:supportsRtl="true">
5152

5253
<!-- This is how we can request a library but still allow the app
5354
to be installed if it doesn't exist. -->
@@ -253,6 +254,46 @@
253254
</intent-filter>
254255
</activity>
255256

257+
<activity android:name=".app.PresentationActivity"
258+
android:label="@string/activity_presentation">
259+
<intent-filter>
260+
<action android:name="android.intent.action.MAIN" />
261+
<category android:name="android.intent.category.SAMPLE_CODE" />
262+
</intent-filter>
263+
</activity>
264+
265+
<activity android:name=".app.PresentationWithMediaRouterActivity"
266+
android:label="@string/activity_presentation_with_media_router">
267+
<intent-filter>
268+
<action android:name="android.intent.action.MAIN" />
269+
<category android:name="android.intent.category.SAMPLE_CODE" />
270+
</intent-filter>
271+
</activity>
272+
273+
<activity android:name=".app.SecureWindowActivity"
274+
android:label="@string/activity_secure_window">
275+
<intent-filter>
276+
<action android:name="android.intent.action.MAIN" />
277+
<category android:name="android.intent.category.SAMPLE_CODE" />
278+
</intent-filter>
279+
</activity>
280+
281+
<activity android:name=".app.SecureDialogActivity"
282+
android:label="@string/activity_secure_dialog">
283+
<intent-filter>
284+
<action android:name="android.intent.action.MAIN" />
285+
<category android:name="android.intent.category.SAMPLE_CODE" />
286+
</intent-filter>
287+
</activity>
288+
289+
<activity android:name=".app.SecureSurfaceViewActivity"
290+
android:label="@string/activity_secure_surface_view">
291+
<intent-filter>
292+
<action android:name="android.intent.action.MAIN" />
293+
<category android:name="android.intent.category.SAMPLE_CODE" />
294+
</intent-filter>
295+
</activity>
296+
256297
<!-- Fragment Samples -->
257298

258299
<activity android:name=".app.FragmentAlertDialog"
@@ -349,6 +390,15 @@
349390
</intent-filter>
350391
</activity>
351392

393+
<activity android:name=".app.FragmentNestingTabs"
394+
android:label="@string/fragment_nesting_tabs"
395+
android:enabled="@bool/atLeastJellyBeanMR1">
396+
<intent-filter>
397+
<action android:name="android.intent.action.MAIN" />
398+
<category android:name="android.intent.category.SAMPLE_CODE" />
399+
</intent-filter>
400+
</activity>
401+
352402
<activity android:name=".app.FragmentRetainInstance"
353403
android:label="@string/fragment_retain_instance"
354404
android:enabled="@bool/atLeastHoneycomb">
@@ -1289,6 +1339,12 @@
12891339
<!-- VIEW/WIDGET PACKAGE SAMPLES -->
12901340
<!-- ************************************* -->
12911341

1342+
<activity android:name=".view.TextClockDemo" android:label="Views/TextClock">
1343+
<intent-filter>
1344+
<action android:name="android.intent.action.MAIN" />
1345+
<category android:name="android.intent.category.SAMPLE_CODE" />
1346+
</intent-filter>
1347+
</activity>
12921348
<activity android:name=".view.ChronometerDemo" android:label="Views/Chronometer">
12931349
<intent-filter>
12941350
<action android:name="android.intent.action.MAIN" />
@@ -1549,14 +1605,21 @@
15491605
</intent-filter>
15501606
</activity>
15511607

1552-
<activity android:name=".view.GridLayout0" android:label="Views/Layouts/GridLayout/0. Simple Form (Java)">
1608+
<activity android:name=".view.GridLayout1" android:label="Views/Layouts/GridLayout/1. Simple Form">
1609+
<intent-filter>
1610+
<action android:name="android.intent.action.MAIN" />
1611+
<category android:name="android.intent.category.SAMPLE_CODE" />
1612+
</intent-filter>
1613+
</activity>
1614+
1615+
<activity android:name=".view.GridLayout2" android:label="Views/Layouts/GridLayout/2. Form (XML)">
15531616
<intent-filter>
15541617
<action android:name="android.intent.action.MAIN" />
15551618
<category android:name="android.intent.category.SAMPLE_CODE" />
15561619
</intent-filter>
15571620
</activity>
15581621

1559-
<activity android:name=".view.GridLayout1" android:label="Views/Layouts/GridLayout/1. Simple Form (XML)">
1622+
<activity android:name=".view.GridLayout3" android:label="Views/Layouts/GridLayout/3. Form (Java)">
15601623
<intent-filter>
15611624
<action android:name="android.intent.action.MAIN" />
15621625
<category android:name="android.intent.category.SAMPLE_CODE" />

‎ApiDemos/project.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=android-16
14+
target=android-17
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<GridLayout
18+
xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:layout_width="match_parent"
20+
android:layout_height="match_parent"
21+
android:useDefaultMargins="true"
22+
android:alignmentMode="alignBounds"
23+
android:rowOrderPreserved="false"
24+
android:columnCount="4"
25+
>
26+
<TextView
27+
android:text="Email setup"
28+
android:textSize="32dip"
29+
android:layout_columnSpan="4"
30+
android:layout_gravity="center_horizontal"
31+
/>
32+
<TextView
33+
android:text="You can configure email in a few simple steps:"
34+
android:textSize="16dip"
35+
android:layout_columnSpan="4"
36+
android:layout_gravity="left"
37+
/>
38+
<TextView
39+
android:text="Email address:"
40+
android:layout_gravity="right"
41+
/>
42+
<EditText
43+
android:ems="10"
44+
/>
45+
<TextView
46+
android:text="Password:"
47+
android:layout_column="0"
48+
android:layout_gravity="right"
49+
/>
50+
<EditText
51+
android:ems="8"
52+
/>
53+
<Button
54+
android:text="Manual setup"
55+
android:layout_row="5"
56+
android:layout_column="3"
57+
/>
58+
<Button
59+
android:text="Next"
60+
android:layout_column="3"
61+
android:layout_gravity="fill_horizontal"
62+
/>
63+
</GridLayout>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2012 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+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:orientation="vertical" android:padding="4dip"
19+
android:gravity="center_horizontal"
20+
android:layout_width="match_parent" android:layout_height="match_parent">
21+
22+
<TextView
23+
android:id="@+id/text"
24+
android:layout_width="wrap_content"
25+
android:layout_height="wrap_content"
26+
android:layout_weight="0"
27+
android:padding="4dip"
28+
android:layout_gravity="center_vertical|center_horizontal"
29+
android:gravity="top|center_horizontal"
30+
android:textAppearance="?android:attr/textAppearanceMedium"
31+
android:text="@string/fragment_arguments_fragment_msg" />
32+
33+
<LinearLayout android:orientation="horizontal" android:padding="4dip"
34+
android:layout_width="match_parent" android:layout_height="wrap_content">
35+
36+
<FrameLayout
37+
android:id="@+id/created1"
38+
android:layout_width="0px"
39+
android:layout_height="wrap_content"
40+
android:layout_weight="1" />
41+
42+
<FrameLayout
43+
android:id="@+id/created2"
44+
android:layout_width="0px"
45+
android:layout_height="wrap_content"
46+
android:layout_weight="1" />
47+
48+
</LinearLayout>
49+
50+
</LinearLayout>

‎ApiDemos/res/layout/fragment_stack.xml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,19 @@
2828
android:layout_weight="1">
2929
</FrameLayout>
3030

31-
<Button android:id="@+id/new_fragment"
31+
<LinearLayout android:orientation="horizontal" android:padding="4dip"
32+
android:gravity="center_horizontal" android:measureWithLargestChild="true"
3233
android:layout_width="wrap_content" android:layout_height="wrap_content"
33-
android:layout_weight="0"
34-
android:text="@string/new_fragment">
35-
<requestFocus />
36-
</Button>
37-
34+
android:layout_weight="0">
35+
<Button android:id="@+id/new_fragment"
36+
android:layout_width="wrap_content" android:layout_height="wrap_content"
37+
android:text="@string/new_fragment">
38+
<requestFocus />
39+
</Button>
40+
<Button android:id="@+id/delete_fragment"
41+
android:layout_width="wrap_content" android:layout_height="wrap_content"
42+
android:layout_weight="0"
43+
android:text="@string/delete_fragment">
44+
</Button>
45+
</LinearLayout>
3846
</LinearLayout>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/* Copyright 2012, The Android Open Source Project
4+
**
5+
** Licensed under the Apache License, Version 2.0 (the "License");
6+
** you may not use this file except in compliance with the License.
7+
** You may obtain a copy of the License at
8+
**
9+
** http://www.apache.org/licenses/LICENSE-2.0
10+
**
11+
** Unless required by applicable law or agreed to in writing, software
12+
** distributed under the License is distributed on an "AS IS" BASIS,
13+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
** See the License for the specific language governing permissions and
15+
** limitations under the License.
16+
*/
17+
-->
18+
19+
<TabHost
20+
xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:id="@android:id/tabhost"
22+
android:layout_width="match_parent"
23+
android:layout_height="match_parent">
24+
25+
<LinearLayout
26+
android:orientation="vertical"
27+
android:layout_width="match_parent"
28+
android:layout_height="match_parent">
29+
30+
<TabWidget
31+
android:id="@android:id/tabs"
32+
android:orientation="horizontal"
33+
android:layout_width="match_parent"
34+
android:layout_height="wrap_content"
35+
android:layout_weight="0"/>
36+
37+
<FrameLayout
38+
android:id="@android:id/tabcontent"
39+
android:layout_width="0dp"
40+
android:layout_height="0dp"
41+
android:layout_weight="0"/>
42+
43+
<FrameLayout
44+
android:id="@+android:id/realtabcontent"
45+
android:layout_width="match_parent"
46+
android:layout_height="0dp"
47+
android:layout_weight="1"/>
48+
49+
</LinearLayout>
50+
</TabHost>

0 commit comments

Comments
 (0)