如何移除EditText上的输入焦点?

可以用LinearLayout来包住EditText,如下:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:orientation="vertical"
 4     android:layout_width="fill_parent"
 5     android:layout_height="fill_parent"
 6     >
 7     <TextView  
 8         android:layout_width="fill_parent" 
 9         android:layout_height="wrap_content" 
10         android:text="@string/hello"
11         />
12     <LinearLayout
13         android:layout_height="wrap_content"
14         android:layout_width="wrap_content"
15         android:focusable="true"
16         android:focusableInTouchMode="true"
17         >
18         <EditText
19             android:layout_width="fill_parent" 
20             android:layout_height="wrap_content" 
21             android:text="@string/hello"
22         />
23     </LinearLayout>
24 </LinearLayout>
posted @ 2012-11-22 13:57  黄泉hj  阅读(259)  评论(0编辑  收藏  举报
沪江在线词典