Files
android_development/samples/BackupRestore/res/layout/backup_restore.xml
Christopher Tate 1c0a20aeeb Backup/Restore sample application
A very simple application: one activity, with a few bits of persistent data that
are updated live by the activity.  To that are added a few alternative agent
implementations, to illustrate various approaches and tradeoffs when implementing
a backup/restore agent.  In particular, there are example agents that do everything
"by hand," either record-by-record or by directly backing up the app's entire
persistent data file; plus an example agent that illustrates how very easy it
is to implement the latter using the OS-provided helpers.

Part of bug #2545514

Change-Id: Iaca33a5113406360c23d6e2e59eb012f9f1e9400
2010-04-06 14:16:26 -07:00

73 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<!-- Layout description of the BackupRestore sample's main activity -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:text="@string/filling_text"
android:textSize="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RadioGroup android:id="@+id/filling_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:orientation="vertical">
<RadioButton android:id="@+id/bacon"
android:text="@string/bacon_label"/>
<RadioButton android:id="@+id/pastrami"
android:text="@string/pastrami_label"/>
<RadioButton android:id="@+id/hummus"
android:text="@string/hummus_label"/>
</RadioGroup>
<TextView android:text="@string/extras_text"
android:textSize="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<CheckBox android:id="@+id/mayo"
android:text="@string/mayo_text"
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<CheckBox android:id="@+id/tomato"
android:text="@string/tomato_text"
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>