edittext 默认隐藏软键盘

方法一:

在 edittext 最外层的布局加入下面两句:

android:focusable="true"
android:focusableInTouchMode="true"

代码如下:

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="horizontal" >

<EditText
android:id="@id/edit_news_gathering_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:hint="@string/newsGatheringTitle"
android:inputType="text" />
</LinearLayout>

属于别人使用的方法,几天后整理,搜不到原引用了,抱歉。

更多相关文章

  1. Android(安卓)Bundle类
  2. Android中两种设置全屏的方法
  3. android弹出软键盘时,editText被遮挡一部分,五分之一左右的问题
  4. 十七、Android学习笔记_Android(安卓)使用 搜索框
  5. Android(安卓)4.0.3 源码编译中添加外部jar包和外部so到apk的方
  6. Android(安卓)编程下 Touch 事件的分发和消费机制
  7. Android四大基本组件介绍与生命周期
  8. 浅谈Java中Collections.sort对List排序的两种方法
  9. Python list sort方法的具体使用

随机推荐

  1. [原]如何在Android用FFmpeg+SDL2.0解码声
  2. Android UI 用户界面开发基本概念概览
  3. 安卓表格布局android:collapseColumns,an
  4. Android测试教程(2):测试基础
  5. android gesture检测
  6. Phonegap软键盘遮挡输入框问题
  7. 漫谈Android安全框架
  8. Android开发者指南(11) ―― Optimizing
  9. Android NDK环境搭建
  10. Android(安卓)Lifecycle 生命周期管理