Xml文件  |  193行  |  7.21 KB

<?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.
-->

<!--
     Layout for using the AndroidKeyStore provider.
     See src/com/android/sdk/security/AndroidKeyStoreUsage.java
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="6dip" >

    <RelativeLayout
        android:id="@+id/entries_list_group"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_marginBottom="12dp"
        android:layout_weight="1" >

        <TextView
            android:id="@+id/entries_list_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginTop="12dp"
            android:text="@string/keystore_entries_list" />

        <ListView
            android:id="@+id/entries_list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/entries_list_label"
            android:layout_below="@+id/entries_list_label"
            android:layout_marginBottom="12dp"
            android:choiceMode="singleChoice" >

            <requestFocus />
        </ListView>

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/sign_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="12dp"
        android:layout_marginTop="12dp" >

        <TextView
            android:id="@+id/key_ops_header"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginBottom="6dp"
            android:text="@string/keystore_key_ops_header"
            android:textAppearance="?android:attr/textAppearanceMedium" />

        <TextView
            android:id="@+id/plaintext_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/key_ops_header"
            android:layout_below="@id/key_ops_header"
            android:layout_marginLeft="6dp"
            android:text="@string/keystore_plaintext" />

        <EditText
            android:id="@+id/plaintext"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBaseline="@+id/plaintext_label"
            android:layout_alignParentRight="true"
            android:layout_toRightOf="@+id/plaintext_label"
            android:layout_marginBottom="12dp"
            android:ems="10"
            android:maxLines="1" />

        <TextView
            android:id="@+id/ciphertext_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/plaintext_label"
            android:layout_below="@+id/plaintext"
            android:text="@string/keystore_ciphertext" />

        <EditText
            android:id="@+id/ciphertext"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBaseline="@+id/ciphertext_label"
            android:layout_alignParentRight="true"
            android:layout_toRightOf="@+id/ciphertext_label"
            android:layout_marginBottom="12dp"
            android:maxLines="1" />

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/plaintext_label"
            android:layout_below="@+id/ciphertext" >

            <Button
                android:id="@+id/sign_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:enabled="false"
                android:text="@string/keystore_sign" />

            <Button
                android:id="@+id/verify_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:enabled="false"
                android:text="@string/keystore_verify" />

            <Button
                android:id="@+id/delete_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:enabled="false"
                android:text="@string/keystore_delete" />

        </LinearLayout>
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/generate_group"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:layout_marginTop="12dp" >

        <TextView
            android:id="@+id/generating_header"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:text="@string/keystore_generating_header"
            android:layout_marginBottom="6dp"
            android:textAppearance="?android:attr/textAppearanceMedium" />

        <TextView
            android:id="@+id/entry_name_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/generating_header"
            android:layout_marginBottom="12dp"
            android:layout_marginLeft="6dp"
            android:layout_alignLeft="@id/generating_header"
            android:text="@string/keystore_entry_alias" />

        <Button
            android:id="@+id/generate_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@id/entry_name_label"
            android:layout_below="@+id/entry_name"
            android:text="@string/keystore_generate" />

        <EditText
            android:id="@+id/entry_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBaseline="@+id/entry_name_label"
            android:layout_alignParentRight="true"
            android:layout_marginBottom="12dp"
            android:layout_toRightOf="@+id/entry_name_label"
            android:ems="10" />
    </RelativeLayout>

</LinearLayout>