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 2017/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="輸入你想輸入的文字" />
總結
以上是生活随笔為你收集整理的android 聊天功能实现,Android聊天背景功能实现的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html画布360图案填充_在Photo
- 下一篇: go语言基础到提高(12)-函数类型与函