protected void onCreate (Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.input);
mInput = (EditText)findViewById(R.id.text_input);
...
mInput.requestFocus();
mInput.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
InputMethodManager keyboard =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
keyboard.showSoftInput(mInput, 0);
}
},200);
}

The keyboard is hidden immediately, so showing the keyboard with some delay will solve the problem.

[工作积累] Software keyboard not shown on Activity.onCreate的更多相关文章

  1. [工作积累] Google/Amazon平台的各种坑

    所谓坑, 就是文档中没有标明的特别需要处理的细节, 工作中会被无故的卡住各种令人恼火的问题. 包括系统级的bug和没有文档化的限制. 继Android的各种坑后, 现在做Amazon平台, 遇到的坑很 ...

  2. [工作积累] Android: Hide Navigation bar 隐藏导航条

    https://developer.android.com/training/system-ui/navigation.html View decorView = getWindow().getDec ...

  3. [工作积累] bitfield

    ISO/IEC 14882:2003: 9.6 Bit-fields [class.bit] A member-declarator of the form identifieropt : const ...

  4. [工作积累] 32bit to 64bit: array index underflow

    先贴一段C++标准(ISO/IEC 14882:2003): 5.2.1 Subscripting: 1 A postfix expression followed by an expression ...

  5. [工作积累] Android system dialog with native callback

    JNI: invoke java dialog with native callback: store native function address in java, and invoke nati ...

  6. [工作积累] GCC 4.6 new[] operator内存对齐的BUG

    对于用户没有定义dctor(包括其所有成员)的类来说, new CLASS[n] 可能会直接请求sizeof(CLASS)*n的空间. 而带有dctor的 类, 因为delete[]的时候要逐个调用析 ...

  7. [工作积累] Android dynamic library & JNI_OnLoad

    Bionic libc doesn't load dependencies for current .so file (diff from Windows or Linux) so a explici ...

  8. [工作积累] NDK通过Java获取package name 和version

    ////////////////////////////////////////////////////////////////////////// //Java code snippet //get ...

  9. [工作积累] UE4 并行渲染的同步 - Sync between FParallelCommandListSet & FRHICommandListImmediate calls

    UE4 的渲染分为两个模式1.编辑器是同步绘制的 2.游戏里是FParallelCommandListSet并行派发的. mesh渲染也分两类,static mesh 使用TStaticMeshDra ...

随机推荐

  1. 旋转转盘选择Menu--第三方开源--CircleMenu

    CircleMenu在github上的项目主页是:https://github.com/zhangphil/Android-CircleMenu CircleMenu用法简单,JAVA代码: pack ...

  2. js控制div动起来

    代码: <html> <head> <title>让div动的测试</title> <script language="javascri ...

  3. java-testng-selenium优化

    由于项目中webui测试的需要,是用testng+selenium的方式,其中遇到过几个问题,记录下,方便以后查看 1.重复运行多次case 因为是selenium,所以有的时候需要运行多次,方法是写 ...

  4. EMVTag系列3《持卡人基本信息数据》

    Ø  9F61    持卡人证件号 L:2–26 R(需求):数据应存在,在读应用数据过程中,终端不检查: (PBOC2.0第五部分中规定)芯片中持卡人姓名 5F20与持卡人姓名扩展9F0B只能使用一 ...

  5. ED/EP系列4《圈存指令》

    1. 圈存交易 通过圈存交易,持卡人可将其在银行相应账户上的资金划入电子存折或电子钱包中. 特点: 1)--必须在金融终端上联机进行; 2)--必须提交个人识别码(PIN) 步骤: 1) --终端: ...

  6. Cron表达式说明

    CronTrigger CronTriggers往往比SimpleTrigger更有用,如果您需要基于日历的概念,而非SimpleTrigger完全指定的时间间隔,复发的发射工作的时间表. CronT ...

  7. Python pexpect出现错误‘module have no attribute "spawn" 解决办法

    今天我遇到了这个错误,现在将错误总结如下: 1.首先查询一下自己的操作系统,pexpect中的spawn()和run()仅仅运行在POSIX系统上,在WINDOWS下是没有这两个东西的,在官网http ...

  8. [Environment Build] Win10下Appach配置

    1. Apache下载,登录http://httpd.apache.org/download.cgi,选择Files for Microsoft Windows, 有以下几个选择, 我选择的是Apac ...

  9. PHP 文件操作函数大全

    <?php 读取文件夹: $handler = opendir("c:\");//打开文件夹 while($dir = readdir($handler)){//遍历文件夹 ...

  10. locate 命令

    ac OS X 下的 locate 在便利性上差了一些.主要是一些辅助工具.我在开始用 Mac OS X 下的locate 时,把过去知道的创立数据库的命令尝试了个遍,就是没有可行的.后来搜索网络才找 ...