当前位置: 首页>>代码示例>>Java>>正文


Java KeyboardUtil类代码示例

本文整理汇总了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;
        }
    });

}
 
开发者ID:bigirstproject,项目名称:JKeyboardPanelSwitch,代码行数:26,代码来源:ChattingResolvedFullScreenActivity.java

示例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;
        }
    });
}
 
开发者ID:bigirstproject,项目名称:JKeyboardPanelSwitch,代码行数:40,代码来源:ChattingResolvedActivity.java

示例3: restoreFocusView

import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
private void restoreFocusView() {
    this.panelLayout.setVisibility(4);
    KeyboardUtil.showKeyboard(this.recordedFocusView);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:5,代码来源:KPSwitchFSPanelLayoutHandler.java

示例4: restoreFocusView

import cn.dreamtobe.kpswitch.util.KeyboardUtil; //导入依赖的package包/类
private void restoreFocusView() {
    panelLayout.setVisibility(View.INVISIBLE);
    KeyboardUtil.showKeyboard(recordedFocusView);

}
 
开发者ID:bigirstproject,项目名称:JKeyboardPanelSwitch,代码行数:6,代码来源:KPSwitchFSPanelLayoutHandler.java


注:本文中的cn.dreamtobe.kpswitch.util.KeyboardUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。