android知识杂记(二)

时间:2015-07-13 18:17:02   收藏:0   阅读:150

记录项目中的android零碎知识点,用以备忘。

 

    <style name="anim_view">
        <item name="@android:windowEnterAnimation">@anim/in</item> //在anim文件夹中定义
        <item name="@android:windowExitAnimation">@anim/out</item>
    </style>

 

editText=(EditText)findViewById(R.id.txtBody);
        editText.setOnTouchListener(new OnTouchListener() {             
            public boolean onTouch(View v, MotionEvent event) {  
                editText.setInputType(InputType.TYPE_NULL); // 关闭软键盘      
                return false;
            }
        }); 
InputMethodManager imm = 
(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editText.getWindowToken(),
0);
imm.toggleSoftInput(0,HIDE_NOT_ALWAYS);
boolean isOpen=imm.isActive();//isOpen若返回true,则表示输入法打开

原文:http://www.cnblogs.com/Fredric-2013/p/4643368.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!