Code Monkey home page Code Monkey logo

chatinputbardemoapp's Introduction

Chat Inputbar Demo App

attachment emojis and voice recording facility in one component

to use this component , just add chatinpur bar in your activity/view where you want user to input text,image,gallery image location etc and

set the permission in android manifest .

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />

in your Activity layout XML File

`<com.twigsoftwares.com.chatinputbar.ChatInputBar android:id="@+id/chat_input_bar_comp" android:layout_width="match_parent" android:layout_height="wrap_content">

</com.twigsoftwares.com.chatinputbar.ChatInputBar>`

in your Activity

mchatInputBar = findViewById(R.id.chat_input_bar_comp);

you can implement various event depending upon your requirement like `@Override public boolean onSubmit(CharSequence input) {

    return true;
}

@Override
public void onLocationClicked() {

    Toast.makeText(this, "Location Clicked", Toast.LENGTH_SHORT).show();

}

@Override
public void onImageClicked() {

    Toast.makeText(this, "Image Clicked", Toast.LENGTH_SHORT).show();
}

@Override
public void onCameraClicked() {
    Toast.makeText(this, "Camera Clicked", Toast.LENGTH_SHORT).show();
}

@Override
public void onExpand() {
    Toast.makeText(this, "Expanded Clicked", Toast.LENGTH_SHORT).show();
}

@Override
public void onCollapse() {
    Toast.makeText(this, "Collapsed Clicked", Toast.LENGTH_SHORT).show();
}

@Override
public void onEmojiKeyboardOpen() {
    Toast.makeText(this, "Emoji Keyboard opened", Toast.LENGTH_SHORT).show();
}


@Override
public void onEmojiKeyboardClosed() {
    Toast.makeText(this, "Emoji Keyboard closed", Toast.LENGTH_SHORT).show();
}

@Override
public void onStarted() {


}

@Override
public void onCancelled() {

}

@Override
public void onInvalid(boolean isInvalid) {

}

@Override
public void onCompleted(String FileName) {
    Toast.makeText(this, FileName, Toast.LENGTH_SHORT).show();
}

@Override
public void onStartTyping() {
    Toast.makeText(this, "Typing Started", Toast.LENGTH_SHORT).show();
}

@Override
public void onStopTyping() {
    Toast.makeText(this, "Typing Ended", Toast.LENGTH_SHORT).show();

}`

Enjoy the Component and do whatever you wanted to do man.

Also have a look at MainActivity.java for complete understanding & asking permission at runtime is important prerequestite of this library

Please keep lincenses and other compliences for below libraries for commercial use

compile 'com.github.uin3566:AllAngleExpandableButton:v1.2.0' compile 'com.devlomi.record-view:record-view:1.1beta' compile 'com.github.hani-momanii:SuperNova-Emoji:1.1'

https://www.buymeacoffee.com/tusharit25

chatinputbardemoapp's People

Contributors

tusharuit25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.