弹出输入法 时 隐藏了 ‘底部状态栏’ 在按 物理 返回键 后, 软键盘消失后 恢复 ‘底部状态栏’
public class ImageViewCareIME extends ImageView
{
public ImageViewCareIME(Context context)
{
super(context);
// TODO Auto-generated constructor stub
}
public static interface ImeUiChangeListener
{
public void onImeUiChange(int bottom);
}
ImeUiChangeListener mImeUiChangeListener;
private int mPreBottom = 0;
public void setOnImeUiChangeListener(ImeUiChangeListener imeUiChangeListener)
{
mImeUiChangeListener = imeUiChangeListener;
}
@Override
protected void onDraw(Canvas canvas)
{
super.onDraw(canvas);
Rect r = new Rect();
if(getGlobalVisibleRect(r))
{
if(r.bottom != mPreBottom)
{
mPreBottom = r.bottom;
System.out.println("Change: " + r.bottom);
}
}
if(null != mImeUiChangeListener)
mImeUiChangeListener.onImeUiChange(r.bottom);
}
}