-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove-auto-focus-EditText.xml
36 lines (35 loc) · 1.11 KB
/
remove-auto-focus-EditText.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
tools:context=".MainActivity"
android:background="#d4c5b8"
android:focusable="true"
android:focusableInTouchMode="true"
>
<!--
RelativeLayout
android:focusable="true"
android:focusableInTouchMode="true"
This two attributes remove focus from both EditText
widgets and set focus to layout container widget.
-->
<EditText
android:id="@+id/et"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:hint="Input your country"
android:padding="10dp"
/>
<EditText
android:id="@+id/et_city"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:hint="Input your City"
android:padding="10dp"
android:layout_below="@+id/et"
/>
</RelativeLayout>