本文整理汇总了Java中cn.dreamtobe.kpswitch.util.KeyboardUtil类的典型用法代码示例。如果您正苦于以下问题:Java KeyboardUtil类的具体用法?Java KeyboardUtil怎么用?Java KeyboardUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KeyboardUtil类属于cn.dreamtobe.kpswitch.util包,在下文中一共展示了KeyboardUtil类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chatting_fullscreen_resolved);
assignViews();
KeyboardUtil.attach(this, panelRoot, new KeyboardUtil.OnKeyboardShowingListener() {
@Override
public void onKeyboardShowing(boolean isShowing) {
Log.d(TAG, String.format("Keyboard is %s", isShowing ? "showing" : "hiding"));
}
});
KPSwitchConflictUtil.attach(panelRoot, plusIv, sendEdt);
contentRyv.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
KPSwitchConflictUtil.hidePanelAndKeyboard(panelRoot);
}
return false;
}
});
}
示例2: onCreate
import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chatting_resolved);
assignViews();
KeyboardUtil.attach(this, mPanelRoot,
// Add keyboard showing state callback, do like this when you want to listen in the
// keyboard's show/hide change.
new KeyboardUtil.OnKeyboardShowingListener() {
@Override
public void onKeyboardShowing(boolean isShowing) {
Log.d(TAG, String.format("Keyboard is %s", isShowing ? "showing" : "hiding"));
}
});
KPSwitchConflictUtil.attach(mPanelRoot, mPlusIv, mSendEdt);
mSendImgTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// mock start the translucent full screen activity.
startActivity(new Intent(ChattingResolvedActivity.this, TranslucentActivity.class));
}
});
mContentRyv.setLayoutManager(new LinearLayoutManager(this));
mContentRyv.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
KPSwitchConflictUtil.hidePanelAndKeyboard(mPanelRoot);
}
return false;
}
});
}
示例3: restoreFocusView
import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
private void restoreFocusView() {
this.panelLayout.setVisibility(4);
KeyboardUtil.showKeyboard(this.recordedFocusView);
}
示例4: restoreFocusView
import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
private void restoreFocusView() {
panelLayout.setVisibility(View.INVISIBLE);
KeyboardUtil.showKeyboard(recordedFocusView);
}