Modelled on the iOS implementation click on the input box area, soft keyboard hide, a super easy to use library of lightweight.
dependencies {
compile 'com.yinglan.keyboard:hidekeyboard:1.0.3'
}
HideUtil.init(this);
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
HideUtil.init(this);
}
}
The library implementation uses the top layer layout android.R.id.content the OnTouchListener listener, rewrite the monitor to be noted.
Apache License Version 2.0