• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Copyright 2019 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<androidx.constraintlayout.widget.ConstraintLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    android:layout_width="wrap_content"
22    android:layout_height="match_parent">
23    <androidx.constraintlayout.widget.Guideline
24        android:id="@+id/guideline_top"
25        android:layout_width="wrap_content"
26        android:layout_height="wrap_content"
27        android:orientation="horizontal"
28        app:layout_constraintGuide_begin="@dimen/usage_pickers_margin_vertical"/>
29
30    <androidx.constraintlayout.widget.Guideline
31        android:id="@+id/guideline_start"
32        android:layout_width="wrap_content"
33        android:layout_height="wrap_content"
34        android:orientation="vertical"
35        app:layout_constraintGuide_begin="@dimen/usage_bytes_picker_margin_horizontal"/>
36
37    <FrameLayout
38        android:id="@+id/bytes_threshold_container"
39        android:layout_width="wrap_content"
40        android:layout_height="wrap_content"
41        android:layout_marginEnd="@dimen/usage_pickers_text_margin_end"
42        android:focusable="true"
43        android:focusableInTouchMode="true"
44        app:layout_constraintBottom_toTopOf="@+id/guideline_bottom"
45        app:layout_constraintEnd_toStartOf="@+id/bytes_units"
46        app:layout_constraintHorizontal_chainStyle="packed"
47        app:layout_constraintStart_toStartOf="@+id/guideline_start"
48        app:layout_constraintTop_toBottomOf="@+id/guideline_top">
49        <EditText
50            android:id="@+id/bytes_threshold"
51            android:layout_width="wrap_content"
52            android:layout_height="match_parent"
53            android:ems="@integer/data_usage_bytes_threshold_ems"
54            android:inputType="numberDecimal"
55            android:minWidth="@dimen/usage_bytes_picker_edit_text_min_width"
56            android:textAppearance="?android:attr/textAppearanceLarge"/>
57    </FrameLayout>
58
59    <FrameLayout
60        android:id="@+id/up_arrow_container"
61        android:layout_width="@dimen/touch_target_size"
62        android:layout_height="@dimen/touch_target_size"
63        android:background="?android:attr/selectableItemBackground"
64        app:layout_constraintEnd_toEndOf="@+id/bytes_units"
65        app:layout_constraintStart_toStartOf="@+id/bytes_units"
66        app:layout_constraintTop_toBottomOf="@+id/guideline_top">
67        <ImageView
68            android:layout_width="wrap_content"
69            android:layout_height="wrap_content"
70            android:layout_gravity="center"
71            android:src="@drawable/ic_keyboard_arrow_up"/>
72    </FrameLayout>
73
74    <NumberPicker
75        android:id="@+id/bytes_units"
76        android:layout_width="@dimen/touch_target_size"
77        android:layout_height="match_parent"
78        android:theme="@style/NumberPickerStyle"
79        app:layout_constraintBottom_toTopOf="@+id/down_arrow_container"
80        app:layout_constraintEnd_toEndOf="@+id/guideline_end"
81        app:layout_constraintStart_toEndOf="@+id/bytes_threshold_container"
82        app:layout_constraintTop_toBottomOf="@+id/up_arrow_container"/>
83
84    <FrameLayout
85        android:id="@+id/down_arrow_container"
86        android:layout_width="@dimen/touch_target_size"
87        android:layout_height="@dimen/touch_target_size"
88        android:background="?android:attr/selectableItemBackground"
89        app:layout_constraintBottom_toTopOf="@+id/guideline_bottom"
90        app:layout_constraintEnd_toEndOf="@+id/bytes_units"
91        app:layout_constraintStart_toStartOf="@+id/bytes_units">
92        <ImageView
93            android:layout_width="wrap_content"
94            android:layout_height="wrap_content"
95            android:layout_gravity="center"
96            android:src="@drawable/ic_keyboard_arrow_down"/>
97    </FrameLayout>
98
99    <androidx.constraintlayout.widget.Guideline
100        android:id="@+id/guideline_end"
101        android:layout_width="wrap_content"
102        android:layout_height="wrap_content"
103        android:orientation="vertical"
104        app:layout_constraintGuide_end="@dimen/usage_bytes_picker_margin_horizontal"/>
105
106    <androidx.constraintlayout.widget.Guideline
107        android:id="@+id/guideline_bottom"
108        android:layout_width="wrap_content"
109        android:layout_height="wrap_content"
110        android:orientation="horizontal"
111        app:layout_constraintGuide_end="@dimen/usage_pickers_margin_vertical"/>
112</androidx.constraintlayout.widget.ConstraintLayout>
113