EditText 失去焦点
16lz
2021-12-04
较简单的 方法是创建两个edittext,edittext默认为第一个聚焦
所以创建两个 ,然后把第一个EditText 的
android:layout_width="fill_parent"
android:layout_height="wrap_content"
改为
android:layout_width="0dp"
android:layout_height="0dp"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
更多相关文章
- Android证书创建之 keytool 错误:java.io.IOException:Incorrect
- 2.5.2 使用alertdialog 创建列表对话框
- 2.5.6 使用progressDialog创建进度对话框
- Android(安卓)Activity 的四种启动模式 lunchMode 和 Intent.set
- Android(安卓)Studio创建计算器Demo
- android之使用mvn构建创造项目步骤
- 2.5.3 使用alertDialog创建自定义对话框
- Android——实现两个控件水平居中
- Android(安卓)之 SQLite数据库的使用