Xml文件  |  268行  |  9.59 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2012 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
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="left"
>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/numberOfCallLogEntries"
    />
    <EditText
        android:id="@+id/number"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:text="10"
        />
    <CheckBox
        android:id="@+id/use_random_numbers"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/useRandomNumbers"
    />
    <Button
        android:id="@+id/add"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/addToCallLogButton"
    />
    <ProgressBar
        android:id="@+id/progress"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:indeterminate="false"
        android:visibility="gone"
    />
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/add_custom_entry"
        />
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        >
        <RadioGroup
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <RadioButton
                android:id="@+id/call_type_incoming"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/call_type_incoming"
                android:textSize="9sp" />
            <RadioButton
                android:id="@+id/call_type_missed"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/call_type_missed"
                android:textSize="9sp" />
            <RadioButton
                android:id="@+id/call_type_outgoing"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/call_type_outgoing"
                android:textSize="9sp" />
            <RadioButton
                android:id="@+id/call_type_voicemail"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/call_type_voicemail"
                android:textSize="9sp" />
            <RadioButton
                android:id="@+id/call_type_custom"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Custom"
                android:textSize="9sp" />
            <EditText
                android:id="@+id/call_type_custom_text"
                android:layout_width="90dp"
                android:layout_height="wrap_content"
                android:text=""
                android:inputType="number" />
        </RadioGroup>
        <CheckBox
            android:id="@+id/call_type_video"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/call_type_video"
            android:textSize="9sp"
            />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/call_date"
            />
        <TextView
            android:id="@+id/call_date"
            android:paddingStart="16dp"
            android:layout_width="120dp"
            android:layout_height="wrap_content"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/edit"
            android:onClick="showDatePickerDialog" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/call_time"
            />
        <TextView
            android:id="@+id/call_time"
            android:paddingStart="16dp"
            android:layout_width="120dp"
            android:layout_height="wrap_content"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/edit"
            android:onClick="showTimePickerDialog" />
    </LinearLayout>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/call_presentation"
        />
    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <RadioButton
            android:id="@+id/presentation_allowed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/presentation_allowed"
            android:textSize="9sp" />
        <RadioButton
            android:id="@+id/presentation_restricted"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/presentation_restricted"
            android:textSize="9sp" />
        <RadioButton
            android:id="@+id/presentation_unknown"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/presentation_unknown"
            android:textSize="9sp" />
        <RadioButton
            android:id="@+id/presentation_payphone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/presentation_payphone"
            android:textSize="9sp" />
    </RadioGroup>
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/number"
            />
        <EditText
            android:id="@+id/phone_number"
            android:layout_width="180dp"
            android:layout_height="wrap_content"
            android:inputType="phone"
            />
    </LinearLayout>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/call_account" />
    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <RadioButton
            android:id="@+id/account0"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/account0"
            android:textSize="9sp" />
        <RadioButton
            android:id="@+id/account1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/account1"
            android:textSize="9sp" />
        <RadioButton
            android:id="@+id/no_account"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/no_account"
            android:textSize="9sp" />
    </RadioGroup>
    <Button
        android:id="@+id/add_custom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/addToCallLogButton"
        android:onClick="addManualEntry"
        />
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/delta_after_add"
            />
        <EditText
            android:id="@+id/delta_after_add"
            android:layout_width="90dp"
            android:layout_height="wrap_content"
            android:text="-1"
            android:inputType="number"
            />
    </LinearLayout>
</LinearLayout>