1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > android 聊天功能实现 Android聊天背景功能实现

android 聊天功能实现 Android聊天背景功能实现

时间:2021-09-08 05:03:46

相关推荐

android 聊天功能实现 Android聊天背景功能实现

解决输入法弹出时背景被顶上去或者挤压变形的问题

先看效果图:

Screenshot_1510219375.png

Screenshot_1510219378.png

实现方案:

package com.qiangqiang.chatback.views;

import android.content.Context;

import android.util.AttributeSet;

import android.view.MotionEvent;

import android.widget.ScrollView;

/**

* Created by qiangqiang on /7/17 0017.

*/

public class NoScrollView extends ScrollView {

public NoScrollView(Context context) {

super(context);

}

public NoScrollView(Context context, AttributeSet attrs) {

super(context, attrs);

}

public NoScrollView(Context context, AttributeSet attrs, int defStyleAttr) {

super(context, attrs, defStyleAttr);

}

@Override

public boolean onTouchEvent(MotionEvent ev) {

return true;

}

}

android:layout_width="match_parent"

android:layout_height="match_parent">

android:layout_width="match_parent"

android:layout_height="match_parent">

android:id="@+id/img_back"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@mipmap/bg"

android:scaleType="centerCrop" />

android:layout_width="match_parent"

android:layout_height="50dp"

android:layout_alignParentBottom="true"

android:hint="输入你想输入的文字" />

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。