码迷,mamicode.com
首页 > 移动开发 > 详细

安卓之缩回软键盘

时间:2015-06-27 09:41:14      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

如下: 

      noScrollgridview.setOnItemClickListener(new OnItemClickListener()
        {

            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                    long arg3)
            {
                InputMethodManager imm = ( InputMethodManager ) arg1.getContext( ).getSystemService( Context.INPUT_METHOD_SERVICE );  
                 imm.hideSoftInputFromWindow( arg1.getApplicationWindowToken( ) , 0 );  
                if (arg2 == Bimp.bmp.size())
                {
                    new PopupWindows(PublishedActivity.this, noScrollgridview);
                }
                else
                {
                    Intent intent = new Intent(PublishedActivity.this,
                            PhotoActivity.class);
                    intent.putExtra("ID", arg2);
                    startActivity(intent);
                }
            }
        });

安卓之缩回软键盘

标签:

原文地址:http://www.cnblogs.com/luminji/p/4603626.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!