阅读背景:

Android Sample Code之API Demos (Activity二): Save & Restore State 《布局Layout》

来源:互联网 
<LinearLayout xmlns:android="https://schemas.android.com/apk/res/android" android:orientation="vertical" android:padding="4dip"    android:layout_width="match_parent" android:layout_height="match_parent">    <TextView android:id="@+id/msg"        android:layout_width="match_parent" android:layout_height="wrap_content"        android:layout_weight="0"        android:paddingBottom="4dip" />    <TextView        android:layout_width="match_parent" android:layout_height="wrap_content"        android:layout_weight="0"        android:paddingBottom="4dip"        android:text="@string/saves_state"/>    <EditText android:id="@+id/saved"        android:layout_width="match_parent" android:layout_height="wrap_content"        android:layout_weight="1"        android:background="@drawable/green"        android:text="@string/initial_text"        android:freezesText="true">        <requestFocus />    </EditText>    <TextView        android:layout_width="match_parent" android:layout_height="wrap_content"        android:layout_weight="0"        android:paddingTop="8dip"        android:paddingBottom="4dip"        android:text="@string/no_saves_state"/>    <EditText         android:layout_width="match_parent" android:layout_height="wrap_content"        android:layout_weight="1"        android:background="@drawable/red"        android:text="@string/initial_text">    </EditText></LinearLayout><LinearLayout xmlns:android="https://schemas.andro



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: