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