1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2014 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    android:layout_width="match_parent"
18    android:layout_height="match_parent"
19    android:gravity="center_horizontal">
20
21    <RelativeLayout
22        android:layout_width="wrap_content"
23        android:layout_height="wrap_content"
24        android:layout_marginTop="40dp">
25
26        <!-- File -->
27        <TextView
28            android:id="@+id/file_label"
29            android:layout_width="wrap_content"
30            android:layout_height="wrap_content"
31            android:text="File"
32            android:textAlignment="center"
33            android:textSize="16sp"
34            android:textStyle="bold"
35            android:layout_marginRight="20dp"
36            android:layout_alignBaseline="@+id/file_name"/>
37
38        <EditText
39            android:id="@+id/file_name"
40            android:layout_width="300sp"
41            android:layout_height="wrap_content"
42            android:layout_toRightOf="@+id/file_label"
43            android:layout_marginBottom="20dp"
44            android:inputType="text"
45            android:text="foo.txt" />
46
47        <!-- Size -->
48        <TextView
49            android:id="@+id/size_label"
50            android:layout_width="wrap_content"
51            android:layout_height="wrap_content"
52            android:layout_below="@+id/file_name"
53            android:layout_alignBaseline="@+id/file_size"
54            android:text="Size"
55            android:textSize="16sp"
56            android:textStyle="bold" />
57
58        <EditText
59            android:id="@+id/file_size"
60            android:layout_width="100dp"
61            android:layout_height="wrap_content"
62            android:layout_below="@+id/file_name"
63            android:layout_alignStart="@+id/file_name"
64            android:layout_marginBottom="20dp"
65            android:inputType="numberDecimal"
66            android:text="10" />
67
68        <Spinner
69            android:id="@+id/file_size_spinner"
70            android:layout_width="0dp"
71            android:layout_height="wrap_content"
72            android:layout_below="@+id/file_name"
73            android:layout_toRightOf="@+id/file_size"
74            android:layout_alignEnd="@+id/file_name"
75            android:layout_marginBottom="20dp"
76            />
77
78        <!-- Storage -->
79        <TextView
80            android:id="@+id/storage_label"
81            android:layout_width="wrap_content"
82            android:layout_height="wrap_content"
83            android:layout_below="@+id/file_size_spinner"
84            android:layout_alignBaseline="@+id/storage_spinner"
85            android:paddingRight="20dp"
86            android:text="Storage"
87            android:textAlignment="center"
88            android:textSize="16sp"
89            android:textStyle="bold" />
90
91        <Spinner
92            android:id="@+id/storage_spinner"
93            android:layout_width="0dp"
94            android:layout_height="wrap_content"
95            android:layout_below="@+id/file_size_spinner"
96            android:layout_toRightOf="@+id/file_size"
97            android:layout_alignEnd="@+id/file_name"/>
98
99        <Button
100            android:id="@+id/create_file_button"
101            android:layout_width="wrap_content"
102            android:layout_height="wrap_content"
103            android:layout_below="@+id/storage_spinner"
104            android:layout_centerInParent="true"
105            android:layout_marginTop="40dp"
106            android:paddingLeft="20dp"
107            android:paddingRight="20dp"
108            android:onClick="onCreateFileButtonClick"
109            android:text="Create" />
110
111    </RelativeLayout>
112</LinearLayout>
113