当前位置: 编程技术>移动开发
本页文章导读:
▪EditView 遏止软键盘自动弹出 EditView 阻止软键盘自动弹出
在AndroidManifest.xml里面选择那个acitivity, 把他的window soft input mode设置成stateHidden和adjustUnspecified如:<activity
android:name=".ClientSearchViewActivity"
android:label="@strin.........
▪ Application Fundamentals 题词 Application Fundamentals 前言
Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android p.........
▪ 掩藏Activity刚进来焦点在EditText时显示输入键盘 隐藏Activity刚进来焦点在EditText时显示输入键盘
今天在搞一个Activity刚进来时焦点在EditText时,会弹出输入的键盘,这不是我想要的,然后就想办法隐藏掉输入键盘。尝试了EditText的clearFocus不.........
[1]EditView 遏止软键盘自动弹出
来源: 互联网 发布时间: 2014-02-18
EditView 阻止软键盘自动弹出
在AndroidManifest.xml里面
选择那个acitivity, 把他的window soft input mode设置成stateHidden和
adjustUnspecified
如:
这样激活这个activity时 就不会弹出软键盘了,手动点击输入框才会弹出。
在AndroidManifest.xml里面
选择那个acitivity, 把他的window soft input mode设置成stateHidden和
adjustUnspecified
如:
<activity android:name=".ClientSearchViewActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="adjustUnspecified|stateHidden" android:configChanges="orientation|keyboardHidden"> </activity>
这样激活这个activity时 就不会弹出软键盘了,手动点击输入框才会弹出。
[2] Application Fundamentals 题词
来源: 互联网 发布时间: 2014-02-18
Application Fundamentals 前言
Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix《翻译:Android应用由Java代码编写,编译生成的Java字节代码和相关的数据或资源文件被打包成一个后缀是apk的归档文件》. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.
In many ways, each Android application lives in its own world:翻译:大多数情况下,每个Android应用生存在自身世界中
By default, every application runs in its own Linux process. Android starts the process when any of the application's code needs to be executed, and shuts down the process when it's no longer needed and system resources are required by other applications.《翻译:默认场合,每个Android应用都将运行在自己独立的Linux进程中,一旦某个应用中的某段代码需要被执行,Android系统将启动一个Linux进程。对于被启动的Linux进程,Android系统也会在不需要该进程的时候或是系统资源需要被其他应用占用的时候关闭已启动的Linux进程。》
Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications.《翻译:每个Linux进程拥有自己的虚拟机,所以所有的应用程序在运行过程中是相互隔离的。》
By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only to that user and only to the application itself — although there are ways to export them to other applications as well.《翻译:默认场合,每个应用都被系统分配一个唯一的Linux用户ID,该应用所关联的所有文件只能被该user ID所见,尽管是有办法可以使得多个应用可以共享资源或数据文件。》
It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can also arrange to run in the same Linux process, sharing the same VM.《翻译:要使得两个应用程序共享同一个Linux user ID也是可能的,一旦这样,那么两个应用就可以共享资源文件,这时候还可以使得两个应用在同一个Linux进程中运行,共享使用同一个虚拟机。》
Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix《翻译:Android应用由Java代码编写,编译生成的Java字节代码和相关的数据或资源文件被打包成一个后缀是apk的归档文件》. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.
In many ways, each Android application lives in its own world:翻译:大多数情况下,每个Android应用生存在自身世界中
By default, every application runs in its own Linux process. Android starts the process when any of the application's code needs to be executed, and shuts down the process when it's no longer needed and system resources are required by other applications.《翻译:默认场合,每个Android应用都将运行在自己独立的Linux进程中,一旦某个应用中的某段代码需要被执行,Android系统将启动一个Linux进程。对于被启动的Linux进程,Android系统也会在不需要该进程的时候或是系统资源需要被其他应用占用的时候关闭已启动的Linux进程。》
Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications.《翻译:每个Linux进程拥有自己的虚拟机,所以所有的应用程序在运行过程中是相互隔离的。》
By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only to that user and only to the application itself — although there are ways to export them to other applications as well.《翻译:默认场合,每个应用都被系统分配一个唯一的Linux用户ID,该应用所关联的所有文件只能被该user ID所见,尽管是有办法可以使得多个应用可以共享资源或数据文件。》
It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can also arrange to run in the same Linux process, sharing the same VM.《翻译:要使得两个应用程序共享同一个Linux user ID也是可能的,一旦这样,那么两个应用就可以共享资源文件,这时候还可以使得两个应用在同一个Linux进程中运行,共享使用同一个虚拟机。》
[3] 掩藏Activity刚进来焦点在EditText时显示输入键盘
来源: 互联网 发布时间: 2014-02-18
隐藏Activity刚进来焦点在EditText时显示输入键盘
今天在搞一个Activity刚进来时焦点在EditText时,会弹出输入的键盘,这不是我想要的,然后就想办法隐藏掉输入键盘。尝试了EditText的clearFocus不行,也试过其它控件ruquestFocus也不行,用隐藏键盘的方法 http://mingkg21.iteye.com/blog/548642
不行。朋友说他用隐藏键盘的方法是OK,难道是我RPWT。实在没办法,我认了,只好找别的方法。
还好有一点点RP,让我解决了。
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
这个方法的意思是,只有点击EditText时才会弹出输入键盘。
1 楼
zx012345
2010-08-27
我也遇到了同样的问题,别的方式都隐藏不掉,只有你说的这种方式可以。
2 楼
yx1989
2012-02-14
恩,这个方法不错
3 楼
董其心
2012-04-24
楼主试试在AndroidManifest 中响应的activity中加上一个属性android:windowSoftInputMode="adjustPan"
最新技术文章: