登陆QQ时的打开软键盘的快捷键怎么打开

安全小技巧&&软键盘登录QQ选择字号:
QQ2010相关版本为全面保证您QQ的密码安全,支持软键盘登录。点击“软键盘”,使用软键盘输入QQ密码登录。使用软键盘可以避免恶意木马盗号攻击,推荐大家使用。
以上信息是否已解决您的问题?
关注微信公众号
关注手Q公众号
社交软件热线3
帐号服务热线6
财付通热线0
支付服务热线95017
目前仅提供以上业务的电话服务,其他产品请在本网站寻求帮助
微信端公众号
QQ端公众号The page is temporarily unavailable
nginx error!
The page you are looking for is temporarily unavailable.
Please try again later.
Website Administrator
Something has triggered an error on your
This is the default error page for
nginx that is distributed with
It is located
/usr/share/nginx/html/50x.html
You should customize this error page for your own
site or edit the error_page directive in
the nginx configuration file
/etc/nginx/nginx.conf.软键盘 怎么让他变化的 字母数字变换位置【电脑吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:2,035,041贴子:
软键盘 怎么让他变化的 字母数字变换位置收藏
2017台北国际电脑展于5月30日至6月3日在台北世贸中心展览馆举办.电脑2017台北国际电脑展即将开幕,点击网站了解详情-国际贸易局广告
什么输入法?一般是用鼠标拖
qq登陆 还是有输入法的?
装qq电脑管家
是不是 安全点
昨天 我号说登陆限制。。。
没人吗。。。。 都肿么了啊
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或Android(7)
Android 软件盘弹出可能会遮挡住界面上的某些控件。当 windowSoftInputMode 为 adjustPan 时,一般不会挡住 EditText,但是假如 EditText 下面是一个登录按钮,那么这个按钮就可能被挡住,但有时我们希望用户输完密码可以直接点击登录按钮,而不用把软键盘收起来。这时就需要用到 adjustResize,这种模式能够获取到软键盘的高度,这样我们就能够精确的对界面进行控制。
在阅读本章之前,你应该了解 windowSoftInputMode 的一些属性,特别是 adjustResize,如果还不熟悉,建议先阅读再回过头来继续往下看。
QQ 登录界面很好的解决了软键盘遮挡问题,当然在大屏手机上软键盘并不会挡住登录按钮。今天我们也来模仿一个 QQ 登录界面,最终效果如下:
监听软键盘弹出及收起事件
step1. 指定 windowSoftInputMode=”adjustResize”
在 AndroidManifest.xml 中相应的 Activity 设置 android:windowSoftInputMode=”adjustResize”,也可以在 java 代码中设置。
step2. 监听 contentView 宽高(layout) 变化
获取 ViewTreeObserver 并监听 OnGlobalLayoutListener。当然最好把这些代码独立出来放在某个帮助类。一开始我是用 View#addOnLayoutChangeListener,同样可以监听软键盘弹出及收起,但是在 onLayoutChange 方法发起一个requestLayout() 有时会出现一些问题。
看代码说话:
public class KeyBoardHelper {
private OnKeyBoardStatusChangeListener onKeyBoardStatusChangeL
private int screenH
private int blankHeight = 0;
public KeyBoardHelper(Activity activity) {
this.activity =
screenHeight = activity.getResources().getDisplayMetrics().heightP
activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
if (activity.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
public void onCreate() {
View content = activity.findViewById(android.R.id.content);
content.getViewTreeObserver().addOnGlobalLayoutListener(onGlobalLayoutListener);
public void onDestory() {
View content = activity.findViewById(android.R.id.content);
content.getViewTreeObserver().removeOnGlobalLayoutListener(onGlobalLayoutListener);
private OnGlobalLayoutListener onGlobalLayoutListener = new OnGlobalLayoutListener() {
public void onGlobalLayout() {
Rect rect = new Rect();
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
int newBlankheight = screenHeight - rect.
if (newBlankheight != blankHeight) {
if (newBlankheight & blankHeight) {
if (onKeyBoardStatusChangeListener != null) {
onKeyBoardStatusChangeListener.OnKeyBoardPop(newBlankheight);
if (onKeyBoardStatusChangeListener != null) {
onKeyBoardStatusChangeListener.OnKeyBoardClose(blankHeight);
blankHeight = newB
public void setOnKeyBoardStatusChangeListener(
OnKeyBoardStatusChangeListener onKeyBoardStatusChangeListener) {
this.onKeyBoardStatusChangeListener = onKeyBoardStatusChangeL
public interface OnKeyBoardStatusChangeListener {
void OnKeyBoardPop(int keyBoardheight);
void OnKeyBoardClose(int oldKeyBoardheight);
实现 QQ 登录界面
有了这个 KeyBoardHelper,那么要实现和 QQ 登录界面一样的效果就不难了。我们甚至不需要任何自定义控件。思路是在软键盘弹出时,把登录按钮以上的布局往上移,只要为其设置一个负值的 topMargin 即可。
如图所示:
MainActivity 代码如下:
import android.app.A
import android.os.B
import android.view.V
import android.view.ViewG
import android.view.ViewGroup.MarginLayoutP
import com.example.qq.support.KeyBoardH
import com.example.qq.support.KeyBoardHelper.OnKeyBoardStatusChangeL
public class MainActivity extends Activity {
private int bottomH
private KeyBoardHelper boardH
private View layoutB
private View layoutC
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_qq_login);
layoutContent = findViewById(R.id.layout_content);
layoutBottom = findViewById(R.id.layout_bottom);
boardHelper = new KeyBoardHelper(this);
boardHelper.onCreate();
boardHelper.setOnKeyBoardStatusChangeListener(onKeyBoardStatusChangeListener);
layoutBottom.post(new Runnable() {
public void run() {
bottomHeight = layoutBottom.getHeight();
private OnKeyBoardStatusChangeListener onKeyBoardStatusChangeListener = new OnKeyBoardStatusChangeListener() {
public void OnKeyBoardPop(int keyBoardheight) {
final int height = keyB
if (bottomHeight & height) {
layoutBottom.setVisibility(View.GONE);
int offset = bottomHeight -
final ViewGroup.MarginLayoutParams lp = (MarginLayoutParams) layoutContent
.getLayoutParams();
lp.topMargin =
layoutContent.setLayoutParams(lp);
public void OnKeyBoardClose(int oldKeyBoardheight) {
if (View.VISIBLE != layoutBottom.getVisibility()) {
layoutBottom.setVisibility(View.VISIBLE);
final ViewGroup.MarginLayoutParams lp = (MarginLayoutParams) layoutContent
.getLayoutParams();
if (lp.topMargin != 0) {
lp.topMargin = 0;
layoutContent.setLayoutParams(lp);
protected void onDestroy() {
super.onDestroy();
boardHelper.onDestory();
布局文件:activity_qq_login.xml
xmlns:android="/apk/res/android"
xmlns:tools="/tools"
android:id="@+id/layout_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" &
android:id="@+id/layout_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" &
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="68dp"
android:focusable="true"
android:scaleType="centerInside"
android:src="@drawable/qq_ava"
android:visibility="visible" /&
android:id="@+id/layout_ed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:background="#ffffff"
android:divider="@drawable/divider"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:showDividers="middle" &
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="QQ号/手机号/邮箱"
android:padding="10dp"
android:textColor="#000000"
android:textColorHint="#d2d2d2"
android:textCursorDrawable="@null" /&
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="密码"
android:padding="10dp"
android:textColor="#000000"
android:textColorHint="#d2d2d2"
android:textCursorDrawable="@null" /&
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:layout_marginRight="14dp"
android:layout_marginTop="14dp"
android:background="@drawable/btn_login"
android:text="登陆"
android:textSize="17sp" /&
android:id="@+id/layout_bottom"
android:layout_width="fill_parent"
android:layout_height="fill_parent" &
android:id="@+id/tv_cannot_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="14dp"
android:text="无法登陆?"
android:textColor="@color/action_bar_bg"
android:textSize="14sp" /&
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="14dp"
android:text="新用户"
android:textColor="@color/action_bar_bg"
android:textSize="14sp" /&
android:id="@+id/appbar"
android:layout_width="fill_parent"
android:layout_height="50dp"
layout="@layout/appbar" /&
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:2540次
排名:千里之外
(1)(1)(6)(2)本帖子已过去太久远了,不再提供回复功能。}

我要回帖

更多关于 如何打开软键盘 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信