Docs: Sync browseable samples for lmp-docs
Synced to developers/samples/android commit bc036ecdf44cd03163c206096172299f3940b057. Change-Id: Ib68230d79ca300e7db906aff2ebfc2cb6c6968f7
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="19"
|
||||
android:targetSdkVersion="19" />
|
||||
<uses-sdk android:minSdkVersion="18"
|
||||
android:targetSdkVersion="21" />
|
||||
|
||||
<application android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -19,6 +19,8 @@ package com.example.android.wearable.synchronizednotifications;
|
||||
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();
|
||||
SynchronizedNotificationsFragment fragment = new SynchronizedNotificationsFragment();
|
||||
@@ -75,4 +79,4 @@ public class MainActivity extends SampleActivityBase {
|
||||
|
||||
Log.i(TAG, "Ready");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user