Git Product home page Git Product logo

emotionkeyboard's Introduction

EmotionKeyboard

仿微信具有表情输入、拍照上传的键盘

01

Download

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
	compile 'com.github.KaneShaw:EmotionKeyboard:1.0.0'
}

Usage

EmotionKeyboard emotionKeyboard = EmotionKeyboard.with(this) //初始化配置		
		.setExtendView(extendView) //设置扩展视图(自定义功能:拍照上传、位置等)		
		.setEmotionView(emotionView) //设置表情视图(自定义添加表情)			
		.bindToContent(contentView) //绑定内容视图		
		.bindToEditText(edittext) //绑定输入框		
		.bindToExtendbutton(extendButton) //绑定扩展视图按钮		
		.bindToEmotionButton(emotionButton) //绑定表情视图按钮			
		.build(); //创建

Notice

最好加上如下代码保证物理返回键的正常使用

public boolean interceptBackPress() {
    	if (mEmotionLayout.isShown()) {
        		hideLayout(mEmotionLayout, false);
        		return true;
    	}
    	return false;
 }

注意:具体使用方法请参照demo

Views Instruction

05 06

emotionkeyboard's People

Contributors

kaneshaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

emotionkeyboard's Issues

没处理虚拟导航手机的问题

private int getSupportSoftInputHeight() {
Rect r = new Rect();
this.mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(r);
int screenHeight = this.mActivity.getWindow().getDecorView().getRootView().getHeight();
int softInputHeight = screenHeight - r.bottom;
int softButtonsBarHeight = getSoftButtonsBarHeight();
LogUtil.e("softButtonsBarHeight",softButtonsBarHeight+"");
LogUtil.e("softInputHeight",softInputHeight +"");

    if(softInputHeight < softButtonsBarHeight) {
        LogUtil.e("EmotionKeyboard", "Warning: value of softInputHeight is below zero!");
    }
    if(softInputHeight > softButtonsBarHeight) {
        this.sp.edit().putInt("soft_input_height", softInputHeight-softButtonsBarHeight).apply();
    }
    return softInputHeight-softButtonsBarHeight;
}

这样可能会好一点

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.