Update browseable samples for lmp-docs
Synced to commit df5e5013422b81b4fd05c0ac9fd964b13624847a. Includes new samples for Android Auto. Change-Id: I3fec46e2a6b3f196682a92f1afd91eb682dc2dc1
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
android:versionName="1.0">
|
||||
|
||||
<!-- ActionBarCompat provides an Action Bar from API v7 onwards -->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
|
||||
|
||||
|
||||
page.tags="ActionBarCompat-Basic"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to create a basic action bar that displays
|
||||
action items. The sample shows how to inflate items from a menu resource, and
|
||||
how to add items programatically. To reduce clutter, rarely used actions are
|
||||
displayed in an action bar overflow.</p>
|
||||
<p>The activity in this sample extends from
|
||||
{@link android.support.v7.app.ActionBarActivity}, which provides the
|
||||
functionality necessary to display a compatible action bar on devices
|
||||
running Android 2.1 and higher.</p>
|
||||
<p>
|
||||
|
||||
This sample shows you how to use ActionBarCompat to create a basic Activity which
|
||||
displays action items. It covers inflating items from a menu resource, as well as adding
|
||||
an item in code. Items that are not shown as action items on the Action Bar are
|
||||
displayed in the action bar overflow.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">ActionBarCompat-Basic</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
android:versionName="1.0">
|
||||
|
||||
<!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="ActionBarCompat-ListPopupMenu"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use a backward compatible
|
||||
{@link android.support.v7.widget.PopupMenu PopupMenu} to create a list, where
|
||||
each list item contains a dropdown menu.</p>
|
||||
<p>The activity in this sample extends from
|
||||
{@link android.support.v7.app.ActionBarActivity}, which provides the
|
||||
functionality necessary to display a compatible action bar on devices
|
||||
running Android 2.1 and higher.</p>
|
||||
<p>
|
||||
|
||||
This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu}
|
||||
from ActionBarCompat to create a list, with each item having a dropdown menu.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">ActionBarCompat-ListPopupMenu</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
<!--
|
||||
ActionBarCompat provides an Action Bar from API v7 onwards
|
||||
-->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="ActionBarCompat-ShareActionProvider"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use a
|
||||
context-sensitive {@link android.support.v7.widget.ShareActionProvider} that is
|
||||
backward compatible.</p>
|
||||
<p>The activity in this sample extends from
|
||||
{@link android.support.v7.app.ActionBarActivity}, which provides the
|
||||
functionality necessary to display a compatible action bar on devices
|
||||
running Android 2.1 and higher.</p>
|
||||
<p>
|
||||
|
||||
This sample shows you how a provide a context-sensitive ShareActionProvider with
|
||||
ActionBarCompat, backwards compatible to API v7.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">ActionBarCompat-ShareActionProvider</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<!--
|
||||
Theme is set on the application so that our custom theme is used by
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="ActionBarCompat-Styled"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use a backward compatible
|
||||
{@link android.support.v7.app.ActionBar} with a customized theme.</p>
|
||||
<p>The activity in this sample extends from
|
||||
{@link android.support.v7.app.ActionBarActivity}, which provides the
|
||||
functionality necessary to display a compatible action bar on devices
|
||||
running Android 2.1 and higher.</p>
|
||||
<p>
|
||||
|
||||
This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a
|
||||
split action bar when running on a device with a narrow display, and show three tabs.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">ActionBarCompat-Styled</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="ActivityInstrumentation"
|
||||
sample.group=Testing
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use an
|
||||
{@link android.test.InstrumentationTestCase} to test the internal state of an
|
||||
{@link android.app.Activity}.</p>
|
||||
<p>To learn more about using Android's custom testing framework, see
|
||||
<a href="{@docRoot}training/activity-testing/index.html">Testing Your
|
||||
Android Activity</a>.</p>
|
||||
<p>
|
||||
|
||||
This sample provides a basic example of using an InstrumentationTest to probe the
|
||||
internal state of an Activity.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">ActivityInstrumentation</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -65,8 +65,8 @@ public class DetailActivity extends Activity {
|
||||
* This could be done in the layout XML, but exposing it via static variables allows easy
|
||||
* querying from other Activities
|
||||
*/
|
||||
mHeaderImageView.setViewName(VIEW_NAME_HEADER_IMAGE);
|
||||
mHeaderTitle.setViewName(VIEW_NAME_HEADER_TITLE);
|
||||
mHeaderImageView.setTransitionName(VIEW_NAME_HEADER_IMAGE);
|
||||
mHeaderTitle.setTransitionName(VIEW_NAME_HEADER_TITLE);
|
||||
// END_INCLUDE(detail_set_view_name)
|
||||
|
||||
loadItem(item);
|
||||
|
||||
@@ -135,8 +135,8 @@ public class MainActivity extends Activity implements AdapterView.OnItemClickLis
|
||||
* As we're in an adapter we need to set each view's name dynamically, using the
|
||||
* item's ID so that the names are unique.
|
||||
*/
|
||||
image.setViewName("grid:image:" + item.getId());
|
||||
name.setViewName("grid:name:" + item.getId());
|
||||
image.setTransitionName("grid:image:" + item.getId());
|
||||
name.setTransitionName("grid:name:" + item.getId());
|
||||
// END_INCLUDE(grid_set_view_name)
|
||||
|
||||
return view;
|
||||
|
||||
@@ -19,9 +19,7 @@ limitations under the License.
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="19"
|
||||
android:targetSdkVersion="19"/>
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
|
||||
|
||||
|
||||
page.tags="AdapterTransition"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>
|
||||
{@link android.transition.Transition Transition} cannot be directly applied to
|
||||
{@link android.widget.AdapterView AdapterView}s. This sample demonstrates how to
|
||||
create a overlay layout and how to run a transition on it.
|
||||
|
||||
Transition cannot be directly applied to AdapterViews. In this sample, we demonstrate how to create an overlay layout and run a Transition on it. Press the action bar button to toggle between ListView and GridView.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">AdapterTransition</string>
|
||||
<string name="intro_message">
|
||||
|
||||
0
samples/browseable/AdapterTransition/res/values/strings.xml
Executable file → Normal file
0
samples/browseable/AdapterTransition/res/values/strings.xml
Executable file → Normal file
@@ -14,9 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
package com.example.android.adaptertransition;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -50,11 +47,13 @@ public class MainActivity extends SampleActivityBase {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
AdapterTransitionFragment fragment = new AdapterTransitionFragment();
|
||||
transaction.replace(R.id.sample_content_fragment, fragment);
|
||||
transaction.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<!-- This sample is to demonstrate features released in API 19.
|
||||
So while it would technically run on an earlier version of Android,
|
||||
there wouldn't be much point) -->
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
<!-- allowBackup declares if the app can be part of device-wide backups such as "adb backup" -->
|
||||
<!-- theme is a way of applying UI decisions across your entire application. You can also
|
||||
define it on a per-application basis. -->
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
|
||||
|
||||
|
||||
page.tags="AdvancedImmersiveMode"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>
|
||||
Android 4.4 introduces a way for you to provide a more immersive screen
|
||||
experience in your app by letting users show or hide the status bar and
|
||||
the navigation bar with a swipe.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This sample demonstrates how this feature interacts with some of the other
|
||||
UI flags related to full-screen apps. The sample also shows how to implement a
|
||||
"sticky" mode, which re-hides the bars a few seconds after the user swipes
|
||||
them back in.
|
||||
\n\n\n\"Immersive Mode\", added in Android 4.4, improves the \"hide full screen\" and
|
||||
\"hide nav bar\" modes, by letting users swipe the bars in and out. This sample
|
||||
lets the user experiment with immersive mode by seeing how it interacts
|
||||
with some of the other UI flags related to full-screen apps.
|
||||
|
||||
</p>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">AdvancedImmersiveMode</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
package com.example.android.advancedimmersivemode;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -50,11 +47,13 @@ public class MainActivity extends SampleActivityBase {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
AdvancedImmersiveModeFragment fragment = new AdvancedImmersiveModeFragment();
|
||||
transaction.replace(R.id.sample_content_fragment, fragment);
|
||||
transaction.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.android.agendadata">
|
||||
package="com.example.android.wearable.agendadata">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19"
|
||||
android:targetSdkVersion="19" />
|
||||
@@ -34,7 +34,7 @@
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<activity
|
||||
android:name="com.example.android.agendadata.MainActivity"
|
||||
android:name="com.example.android.wearable.agendadata.MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||
<intent-filter>
|
||||
@@ -43,6 +43,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name="com.example.android.agendadata.CalendarQueryService"/>
|
||||
<service android:name="com.example.android.wearable.agendadata.CalendarQueryService"/>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,21 +14,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
|
||||
import static com.example.android.agendadata.Constants.TAG;
|
||||
import static com.example.android.agendadata.Constants.CONNECTION_TIME_OUT_MS;
|
||||
import static com.example.android.agendadata.Constants.CAL_DATA_ITEM_PATH_PREFIX;
|
||||
import static com.example.android.agendadata.Constants.ALL_DAY;
|
||||
import static com.example.android.agendadata.Constants.BEGIN;
|
||||
import static com.example.android.agendadata.Constants.DATA_ITEM_URI;
|
||||
import static com.example.android.agendadata.Constants.DESCRIPTION;
|
||||
import static com.example.android.agendadata.Constants.END;
|
||||
import static com.example.android.agendadata.Constants.EVENT_ID;
|
||||
import static com.example.android.agendadata.Constants.ID;
|
||||
import static com.example.android.agendadata.Constants.PROFILE_PIC;
|
||||
import static com.example.android.agendadata.Constants.TITLE;
|
||||
import static com.example.android.wearable.agendadata.Constants.TAG;
|
||||
import static com.example.android.wearable.agendadata.Constants.CONNECTION_TIME_OUT_MS;
|
||||
import static com.example.android.wearable.agendadata.Constants.CAL_DATA_ITEM_PATH_PREFIX;
|
||||
import static com.example.android.wearable.agendadata.Constants.ALL_DAY;
|
||||
import static com.example.android.wearable.agendadata.Constants.BEGIN;
|
||||
import static com.example.android.wearable.agendadata.Constants.DATA_ITEM_URI;
|
||||
import static com.example.android.wearable.agendadata.Constants.DESCRIPTION;
|
||||
import static com.example.android.wearable.agendadata.Constants.END;
|
||||
import static com.example.android.wearable.agendadata.Constants.EVENT_ID;
|
||||
import static com.example.android.wearable.agendadata.Constants.ID;
|
||||
import static com.example.android.wearable.agendadata.Constants.PROFILE_PIC;
|
||||
import static com.example.android.wearable.agendadata.Constants.TITLE;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.ContentResolver;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
/** Constants used in companion app. */
|
||||
public final class Constants {
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
import static com.example.android.agendadata.Constants.TAG;
|
||||
import static com.example.android.wearable.agendadata.Constants.TAG;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
@@ -1,25 +0,0 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.android.agendadata.common">
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name">
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -15,7 +15,7 @@
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.android.agendadata" >
|
||||
package="com.example.android.wearable.agendadata" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="20"
|
||||
android:targetSdkVersion="20" />
|
||||
@@ -32,13 +32,13 @@
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<service
|
||||
android:name="com.example.android.agendadata.HomeListenerService" >
|
||||
android:name="com.example.android.wearable.agendadata.HomeListenerService" >
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name="com.example.android.agendadata.DeleteService"/>
|
||||
<service android:name="com.example.android.wearable.agendadata.DeleteService"/>
|
||||
|
||||
<activity android:name="android.support.wearable.activity.ConfirmationActivity"/>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
/** Constants used in wearable app. */
|
||||
public final class Constants {
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
import static com.example.android.agendadata.Constants.TAG;
|
||||
import static com.example.android.agendadata.Constants.EXTRA_SILENT;
|
||||
import static com.example.android.wearable.agendadata.Constants.TAG;
|
||||
import static com.example.android.wearable.agendadata.Constants.EXTRA_SILENT;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.Intent;
|
||||
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.example.android.agendadata;
|
||||
package com.example.android.wearable.agendadata;
|
||||
|
||||
import static com.example.android.agendadata.Constants.TAG;
|
||||
import static com.example.android.agendadata.Constants.EXTRA_SILENT;
|
||||
import static com.example.android.wearable.agendadata.Constants.TAG;
|
||||
import static com.example.android.wearable.agendadata.Constants.EXTRA_SILENT;
|
||||
|
||||
import static com.example.android.agendadata.Constants.ALL_DAY;
|
||||
import static com.example.android.agendadata.Constants.BEGIN;
|
||||
import static com.example.android.agendadata.Constants.DESCRIPTION;
|
||||
import static com.example.android.agendadata.Constants.END;
|
||||
import static com.example.android.agendadata.Constants.PROFILE_PIC;
|
||||
import static com.example.android.agendadata.Constants.TITLE;
|
||||
import static com.example.android.wearable.agendadata.Constants.ALL_DAY;
|
||||
import static com.example.android.wearable.agendadata.Constants.BEGIN;
|
||||
import static com.example.android.wearable.agendadata.Constants.DESCRIPTION;
|
||||
import static com.example.android.wearable.agendadata.Constants.END;
|
||||
import static com.example.android.wearable.agendadata.Constants.PROFILE_PIC;
|
||||
import static com.example.android.wearable.agendadata.Constants.TITLE;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
@@ -22,7 +22,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="18" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/ic_launcher">
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
page.tags="AppRestrictions"
|
||||
sample.group=Content
|
||||
@jd:body
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">AppRestrictions</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="11"
|
||||
android:targetSdkVersion="16" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicAccessibility"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to create applications that are accessible for
|
||||
users with visual or physical disabilities.</p>
|
||||
<p>To learn how to make the most of the accessibility features built into
|
||||
the Android framework, see
|
||||
<a href="{@docRoot}training/accessibility/index.html">Implementing Accessibility</a>.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates how to create an accessible application, using a mix of different widgets demonstrating different ways of adding accessibility markup to a UI.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicAccessibility</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="19" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicAndroidKeyStore"
|
||||
sample.group=Security
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use a {java.security.KeyStore} to
|
||||
safely create and store encryption keys that only your application can access.
|
||||
You can also sign data using those keys.</p>
|
||||
<p>To see this in action, run the sample application and click:</p>
|
||||
<ul>
|
||||
<li><strong>Create</strong> to create a new KeyPair.</li>
|
||||
<li><strong>Sign</strong> to sign some data using a KeyPair.</li>
|
||||
<li><strong>Verify</strong> to verify the data using the signature provided.</li>
|
||||
<p>
|
||||
|
||||
Welcome to the <b>Basic Android Key Store</b> sample!\n\n
|
||||
This sample demonstrates how to use the Android Key Store to safely create and store
|
||||
encryption keys that only your application can access. You can also sign data
|
||||
using those keys.\n\n
|
||||
To create a new KeyPair, click \"Create\".\n\n
|
||||
To sign some data using a KeyPair, click \"Sign\".\n\n
|
||||
To verify the data using the signature provided, click \"Verify\".\n\n
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicAndroidKeyStore</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
package com.example.android.basicandroidkeystore;
|
||||
|
||||
import android.graphics.Color;
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
<!-- BEGIN_INCLUDE(contacts_permission) -->
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<!-- END_INCLUDE(contacts_permission) -->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="18"
|
||||
android:targetSdkVersion="18" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
<permission android:name="android"></permission>
|
||||
|
||||
<application
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicContactables"
|
||||
sample.group=Content
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use the
|
||||
{@link android.provider.ContactsContract.Data} table to search for contacts.</p>
|
||||
<p>The sample sends consolidated query strings to the
|
||||
{@link android.provider.ContactsContract.Data} table to match both contact
|
||||
names and phone numbers. This approach helps to reduce the number of
|
||||
queries needed when searching the contacts database.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates how to use the Contactables table to search for contacts.
|
||||
\n\nQuery strings sent to the Contactables table will match both contact names and phone numbers,
|
||||
reducing the number of queries your application needs to use when searching the contacts database!
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicContactables</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicGestureDetect"
|
||||
sample.group=Input
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use the {@link android.view.GestureDetector}
|
||||
API to detect simple dragging and tapping gestures.</p>
|
||||
<p>To learn more about detecting basic touch gestures such as scrolling,
|
||||
flinging, and double-tapping, see
|
||||
<a href="{@docRoot}training/gestures/detector.html">Detecting Common Gestures</a>.</p>
|
||||
<p>
|
||||
|
||||
Welcome to Basic Gesture Detect!
|
||||
In order to try this sample out, try dragging or tapping this text to see what happens!
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicGestureDetect</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="sample_action">Clear Text</string>
|
||||
</resources>
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
package com.example.android.basicgesturedetect;
|
||||
|
||||
import android.graphics.Color;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicImmersiveMode"
|
||||
sample.group=UI
|
||||
@jd:body
|
||||
|
||||
<p>Android 4.4 introduces a way for you to provide a more immersive screen
|
||||
experience in your app, by letting users show or hide the status bar and
|
||||
navigation bar with a swipe.</p>
|
||||
<p>This sample demonstrates how to enable and disable this feature
|
||||
programmatically.</p>
|
||||
<p>
|
||||
|
||||
\"Immersive Mode\" is a new UI mode which improves \"hide full screen\" and
|
||||
\"hide nav bar\" modes, by letting users swipe the bars in and out. This sample
|
||||
demonstrates how to enable and disable immersive mode programmatically.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicImmersiveMode</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="sample_action">Toggle Immersive Mode!</string>
|
||||
</resources>
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
package com.example.android.basicimmersivemode;
|
||||
|
||||
import android.graphics.Color;
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="17"/>
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:label="@string/app_name" android:icon="@drawable/ic_launcher">
|
||||
<activity
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicMediaDecoder"
|
||||
sample.group=Media
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to decode a video using
|
||||
the {@link android.media.MediaCodec} API and render in an activity.</p>
|
||||
<p>
|
||||
|
||||
This activity uses a TextureView to render the frames of a video decoded using the
|
||||
MediaCodec API.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicMediaDecoder</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="17"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicMediaRouter"
|
||||
sample.group=Media
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use the {@link android.media.MediaRouter}
|
||||
API to display content on a secondary display.</p>
|
||||
<p>To see this in action, run the sample and use the
|
||||
<strong>Media Route Action Item</strong> in the action bar to select an
|
||||
output device. If your device supports Miracast wireless displays, you may
|
||||
need to enable <strong>Wireless Display</strong> functionality in the
|
||||
system settings.</p>
|
||||
<p>You can also enable secondary screen simulation from the
|
||||
<em>Developer options</em> in the system Settings. Once
|
||||
connected, use the <strong>Change Color</strong> button to change the
|
||||
background color of the secondary screen.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates the use of the MediaRouter API to display
|
||||
content on a secondary display.\n\nUse the "Media Route Action Item" in the ActionBar
|
||||
to select an output device. If your device supports Miracast wireless displays,
|
||||
you may need to enable "Wireless Display" functionality in the system settings.
|
||||
Secondary screen simulation can also be enabled from the "Developer Options".\n\n
|
||||
Once connected, use the "Change Color" button to change the background color of the secondary screen.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicMediaRouter</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicMultitouch"
|
||||
sample.group=Input
|
||||
@jd:body
|
||||
|
||||
<p>This samples demonstrates how to use the {@link android.view.MotionEvent}
|
||||
API to keep track of individual touches across multiple touch events.</p>
|
||||
<p>To see this in action, run the sample and touch the screen with multiple
|
||||
fingers to show that the pointer id (also represented by a colour) does not
|
||||
change as new touch events are received.</p>
|
||||
<p>
|
||||
|
||||
This samples demonstrates the use of MotionEvent properties to keep track of individual touches
|
||||
across multiple touch events.
|
||||
\n\nTouch the screen with multiple fingers to show that the pointer id
|
||||
(also represented by a colour) does not change as new touch events are received.</string>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicMultitouch</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicNetworking"
|
||||
sample.group=Connectivity
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to use the
|
||||
{@link android.net.ConnectivityManager} to determine if the device has an
|
||||
active network connection, and if so, retrieve the connection type.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates how to use the ConnectivityManager to determine if you have
|
||||
a network connection, and if so, what type of connection it is.
|
||||
\n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
|
||||
on the active connection, and then the connection type is printed to an on-screen console.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicNetworking</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="17"/>
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicNotifications"
|
||||
sample.group=UI
|
||||
sample.group=Notification
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to display events in the system's notification
|
||||
bar. The {@link android.support.v4.app.NotificationCompat} API is used for
|
||||
compatibility with devices running Android 2.2 or higher.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates how to display events in the system\'s notification bar. The
|
||||
NotificationCompat API is used for compatibility with older devices, running Android
|
||||
2.2 (Froyo) or newer.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicNotifications</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicRenderScript"
|
||||
sample.group=RenderScript
|
||||
@jd:body
|
||||
|
||||
<p>
|
||||
This sample demonstrates the basic steps for using RenderScript. In this
|
||||
example, the app uses <a href=
|
||||
"{@docRoot}guide/topics/renderscript/compute.html">RenderScript</a> to
|
||||
perform graphical filter operations on a image.
|
||||
|
||||
BasicRenderScript sample demonstrates basic steps how to use renderScript.
|
||||
In the sample, it performs graphical filter operation on a image with renderScript.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
@@ -14,9 +14,6 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<string name="app_name">BasicRenderScript</string>
|
||||
<string name="intro_message">
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.Surface;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Queue;
|
||||
@@ -136,7 +137,7 @@ public class MediaCodecWrapper {
|
||||
* @return
|
||||
*/
|
||||
public static MediaCodecWrapper fromVideoFormat(final MediaFormat trackFormat,
|
||||
Surface surface) {
|
||||
Surface surface) throws IOException {
|
||||
MediaCodecWrapper result = null;
|
||||
MediaCodec videoCodec = null;
|
||||
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
android:versionName="1.0">
|
||||
|
||||
<!-- SyncAdapters are available in API 5 and above. We use API 7 as a baseline for samples. -->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
android:targetSdkVersion="17" />
|
||||
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
|
||||
|
||||
<!-- Required for fetching feed data. -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
|
||||
|
||||
page.tags="BasicSyncAdapter"
|
||||
sample.group=Connectivity
|
||||
@jd:body
|
||||
|
||||
<p>This sample demonstrates how to implement a sync adapter to fetch background
|
||||
data for an app that doesn't require a user-visible account type or two-way
|
||||
synchronization.</p>
|
||||
<p>The sample periodically downloads the feed from the <a href="http://android-developers.blogspot.com/">Android Developers Blog</a> and caches the data in a content provider. At runtime, the cached feed data is
|
||||
displayed inside a {@link android.widget.ListView}.</p>
|
||||
<p>To learn more about creating and using sync adapters, see
|
||||
<a href="{@docRoot}training/sync-adapters/index.html">Transferring Data Using Sync Adapters</a>.</p>
|
||||
<p>
|
||||
|
||||
This sample demonstrates using SyncAdapter to fetch background data for an app that
|
||||
doesn\'t require a user-visible account type or 2-way synchronization.
|
||||
|
||||
\n\nThis sample periodically downloads the feed from the Android Developer Blog and
|
||||
caches the data in a content provider. At runtime, the cached feed data is displayed
|
||||
inside a ListView.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright 2014 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.Material.Light" />
|
||||
|
||||
</resources>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user