private CustomEditText merchOrder;//商户订单号
private CustomEditText productDescription;//商品描述
private CustomEditText additionalInfo;//附加信息
//创建handlerHandler handler1 = new Handler() { public void handleMessage(android.os.Message msg) { if (msg.what == 0) //如果消息是刚才发送的标识 { InputMethodManager inputMethodManager = (InputMethodManager) OtherInfoActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE); //inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);//没有显示则显示 inputMethodManager.hideSoftInputFromWindow(merchOrder.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); inputMethodManager.hideSoftInputFromWindow(productDescription.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); inputMethodManager.hideSoftInputFromWindow(additionalInfo.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);//总是关闭显示 } }};
merchOrder = (CustomEditText) findViewById(R.id.et_merch_order);
productDescription = (CustomEditText) findViewById(R.id.et_product_description);
additionalInfo = (CustomEditText) findViewById(R.id.et_additional_info);
class MyThread extends Thread {
@Override
public void run() {
//延迟1分钟更新
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
// Auto-generated catch block
e.printStackTrace();
}
handler1.sendEmptyMessage(0); //工作线程的handler发送消息
}
}
注:如有问题可以回复,看到第一时间分析解决,码农不易,感觉对您有用,帮助到您,可否打赏一杯可乐,在此谢过诸位,愿诸君终成大神,前程似锦~~~