Skip to content

Most visited

Recently visited

navigation
AppRestrictionEnforcer / res / layout /

fragment_app_restriction_enforcer.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
  Copyright 2014 The Android Open Source Project
4
 
5
  Licensed under the Apache License, Version 2.0 (the "License");
6
  you may not use this file except in compliance with the License.
7
  You may obtain a copy of the License at
8
 
9
      http://www.apache.org/licenses/LICENSE-2.0
10
 
11
  Unless required by applicable law or agreed to in writing, software
12
  distributed under the License is distributed on an "AS IS" BASIS,
13
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
  See the License for the specific language governing permissions and
15
  limitations under the License.
16
-->
17
 
18
<ScrollView
19
    xmlns:android="http://schemas.android.com/apk/res/android"
20
    android:layout_width="match_parent"
21
    android:layout_height="match_parent">
22
 
23
    <LinearLayout
24
        android:layout_width="match_parent"
25
        android:layout_height="wrap_content"
26
        android:orientation="vertical"
27
        android:paddingBottom="@dimen/vertical_page_margin"
28
        android:paddingLeft="@dimen/horizontal_page_margin"
29
        android:paddingRight="@dimen/horizontal_page_margin"
30
        android:paddingTop="@dimen/vertical_page_margin">
31
 
32
 
33
        <Switch
34
            android:id="@+id/say_hello"
35
            android:layout_width="wrap_content"
36
            android:layout_height="wrap_content"
37
            android:text="@string/allow_saying_hello"/>
38
 
39
        <LinearLayout
40
            android:layout_width="match_parent"
41
            android:layout_height="wrap_content"
42
            android:layout_marginTop="@dimen/vertical_page_margin"
43
            android:orientation="horizontal">
44
 
45
            <TextView
46
                android:layout_width="wrap_content"
47
                android:layout_height="wrap_content"
48
                android:labelFor="@id/message"
49
                android:text="@string/message"/>
50
 
51
            <EditText
52
                android:id="@id/message"
53
                android:layout_width="0dp"
54
                android:layout_height="wrap_content"
55
                android:layout_weight="1"
56
                android:inputType="text"
57
                android:maxLines="1"/>
58
 
59
        </LinearLayout>
60
 
61
        <LinearLayout
62
            android:layout_width="match_parent"
63
            android:layout_height="wrap_content"
64
            android:layout_marginTop="@dimen/vertical_page_margin"
65
            android:orientation="horizontal">
66
 
67
            <TextView
68
                android:layout_width="wrap_content"
69
                android:layout_height="wrap_content"
70
                android:labelFor="@id/number"
71
                android:text="@string/number"/>
72
 
73
            <EditText
74
                android:id="@id/number"
75
                android:layout_width="0dp"
76
                android:layout_height="wrap_content"
77
                android:layout_weight="1"
78
                android:inputType="number"
79
                android:maxLines="1"/>
80
 
81
        </LinearLayout>
82
 
83
        <LinearLayout
84
            android:layout_width="match_parent"
85
            android:layout_height="wrap_content"
86
            android:layout_marginTop="@dimen/vertical_page_margin"
87
            android:orientation="horizontal">
88
 
89
            <TextView
90
                android:layout_width="wrap_content"
91
                android:layout_height="wrap_content"
92
                android:text="@string/rank"/>
93
 
94
            <Spinner
95
                android:id="@+id/rank"
96
                android:layout_width="wrap_content"
97
                android:layout_height="wrap_content"
98
                android:layout_marginStart="@dimen/margin_small"/>
99
 
100
        </LinearLayout>
101
 
102
        <LinearLayout
103
            android:layout_width="match_parent"
104
            android:layout_height="wrap_content"
105
            android:layout_marginTop="@dimen/vertical_page_margin"
106
            android:orientation="horizontal">
107
 
108
            <TextView
109
                android:layout_width="wrap_content"
110
                android:layout_height="wrap_content"
111
                android:text="@string/approvals"/>
112
 
113
            <LinearLayout
114
                android:id="@+id/approvals"
115
                android:layout_width="wrap_content"
116
                android:layout_height="wrap_content"
117
                android:layout_marginStart="@dimen/margin_small"
118
                android:orientation="vertical"/>
119
 
120
        </LinearLayout>
121
 
122
        <RelativeLayout
123
            android:id="@+id/bundle_array_layout"
124
            android:layout_width="match_parent"
125
            android:layout_height="wrap_content">
126
 
127
            <TextView
128
                android:id="@+id/items_label"
129
                android:layout_width="wrap_content"
130
                android:layout_height="wrap_content"
131
                android:layout_alignParentTop="true"
132
                android:text="@string/items"/>
133
 
134
            <LinearLayout
135
                android:id="@+id/items"
136
                android:layout_width="wrap_content"
137
                android:layout_height="wrap_content"
138
                android:layout_alignParentEnd="true"
139
                android:layout_alignParentTop="true"
140
                android:layout_toEndOf="@id/items_label"
141
                android:orientation="vertical"
142
                android:paddingEnd="16dp"
143
                android:paddingStart="16dp"/>
144
 
145
            <Button
146
                android:id="@+id/item_add"
147
                android:layout_width="wrap_content"
148
                android:layout_height="wrap_content"
149
                android:layout_below="@id/items"
150
                android:layout_toEndOf="@id/items_label"
151
                android:text="@string/add"/>
152
 
153
        </RelativeLayout>
154
 
155
    </LinearLayout>
156
 
157
</ScrollView>
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.