if (android.os.Build.VERSION.SDK_INT <= 10)
{
inputMoney.setInputType(InputType.TYPE_NULL);
}
else
{
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
try
{
Class<EditText> cls = EditText.class;
Method setShowSoftInputOnFocus;
setShowSoftInputOnFocus = cls.getMethod("setShowSoftInputOnFocus", boolean.class);
setShowSoftInputOnFocus.setAccessible(true);
setShowSoftInputOnFocus.invoke(inputMoney, false);
} catch (Exception e)
{
e.printStackTrace();
}
}
原文链接:http://www.apkbus.com/blog-460955-59315.html
打开App,阅读手记