在xlistview 底部 重叠一个EditText 初始在程序中让它隐藏
按下popupwindow评论按钮后先让输入法弹出, 让评论popupwindow隐藏,显示EditText
InputMethodManager imm = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
commentPop.dismiss();
editsendLayout.setVisibility(View.VISIBLE);
et.setFocusableInTouchMode(true);
et.requestFocus();
按屏幕时隐藏输入框
LinearLayout ll = (LinearLayout)convertView.findViewById(R.id.sharefooditem_screen);
ll.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(editsendLayout.getVisibility() == View.VISIBLE) {
editsendLayout.setVisibility(View.INVISIBLE);
InputMethodManager imm = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(et.getWindowToken(), 0);
}
}
});