解决搜索页面点下载软键盘不发收起来问题
This commit is contained in:
@ -8,6 +8,7 @@ import android.support.v4.util.ArrayMap;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
@ -392,10 +393,16 @@ public class DownloadItemUtils {
|
||||
final TextView downloadBtn,
|
||||
final GameEntity entity,
|
||||
final String entrance,
|
||||
final String location) {
|
||||
final String location,
|
||||
final boolean isCloseSoftInput) {
|
||||
downloadBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
if (isCloseSoftInput) {
|
||||
InputMethodManager imm = (InputMethodManager) context
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||
}
|
||||
DownloadDialog.getInstance(context).showPopupWindow(v, entity, entrance, location);
|
||||
}
|
||||
});
|
||||
@ -407,12 +414,13 @@ public class DownloadItemUtils {
|
||||
int position,
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder> adapter,
|
||||
String entrance,
|
||||
String location) {
|
||||
String location,
|
||||
boolean isCloseSoftInput) {
|
||||
|
||||
if (gameEntity.getApk().size() == 1) {
|
||||
setNormalOnClickListener(context, downloadBtn, gameEntity, position, adapter, entrance, location);
|
||||
} else {
|
||||
setPluginOnClickListener(context, downloadBtn, gameEntity, entrance, location);
|
||||
setPluginOnClickListener(context, downloadBtn, gameEntity, entrance, location, isCloseSoftInput);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user