Docs: Sync browseable samples for lmp-docs

Synced to developers/samples/android commit
bc036ecdf44cd03163c206096172299f3940b057.

Change-Id: Ib68230d79ca300e7db906aff2ebfc2cb6c6968f7
This commit is contained in:
Trevor Johns
2014-12-09 18:47:59 -08:00
parent 1ccf8350d5
commit abededd8f7
503 changed files with 8907 additions and 2690 deletions

View File

@@ -3,12 +3,13 @@ sample.group=Security
@jd:body
<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
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>

View File

@@ -13,25 +13,30 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:id="@+id/sample_main_layout">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:background="@android:color/white"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/intro_message"
android:layout_margin="16dp" />
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
android:layout_weight="1"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
</LinearLayout>
android:orientation="vertical">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:background="@android:color/white"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/intro_message"
android:layout_margin="16dp" />
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
</LinearLayout>
</ScrollView>

View File

@@ -13,24 +13,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:id="@+id/sample_main_layout">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:background="@android:color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/intro_message"
android:padding="16dp"
android:layout_margin="16dp"/>
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
</LinearLayout>
android:orientation="vertical">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:background="@android:color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_margin="16dp"/>
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
</LinearLayout>
</ScrollView>

View File

@@ -13,27 +13,31 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:id="@+id/sample_main_layout">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/intro_message"
android:padding="16dp" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
android:layout_weight="1"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
android:layout_height="match_parent"
android:orientation="vertical">
<TextView android:id="@+id/sample_output"
style="@style/Widget.SampleMessage"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>
<fragment
android:name="com.example.android.common.logger.LogFragment"
android:id="@+id/log_fragment"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
</resources>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Activity themes -->
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>
</resources>

View File

@@ -1,22 +0,0 @@
<!--
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>

View File

@@ -19,14 +19,15 @@
<string name="intro_message">
<![CDATA[
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
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
]]>
</string>

View File

@@ -19,6 +19,8 @@ package com.example.android.basicandroidkeystore;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.text.Html;
import android.widget.TextView;
import android.view.Menu;
import com.example.android.common.activities.SampleActivityBase;
@@ -41,6 +43,8 @@ public class MainActivity extends SampleActivityBase {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView sampleOutput = (TextView) findViewById(R.id.sample_output);
sampleOutput.setText(Html.fromHtml(getString(R.string.intro_message)));
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
BasicAndroidKeyStoreFragment fragment = new BasicAndroidKeyStoreFragment();
@@ -75,4 +79,4 @@ public class MainActivity extends SampleActivityBase {
Log.i(TAG, "Ready");
}
}
}