Code Monkey home page Code Monkey logo

chatmessageview's Introduction

ChatMessageView

ChatMessageView helps you to create chat message view quickly like a typical chatting application. Its a container view, so you can add any type of message such as TextView or any customize TextView, ImageView, etc.

Features

  1. Can have any child inside of it.
  2. You can change color of ChatMessageView normal and pressed.
  3. Adjustable arrow position (top, bottom, left, right)
  4. Adjustable arrow gravity (start, end, center)
  5. Chat view without arrow

Sample Screen

ChatMessageView

Installation

add gradle dependency to your dependency list:

dependencies {
	compile 'me.himanshusoni.chatmessageview:chat-message-view:1.0.1'
}

Use

  1. Include ChatMessageView in your xml of adapter view with content inside.
<me.himanshusoni.chatmessageview.ChatMessageView
	xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:backgroundColor="#88BABABA"
    app:backgroundColorPressed="#FFBABABA"
    app:cornerRadius="3dp" >

    <TextView
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello" />

        <!-- ... -->

</me.himanshusoni.chatmessageview.ChatMessageView>

Customization

Attributes:

app:arrowGravity="start|end|center"
app:arrowPosition="right|left|top|bottom"
app:arrowMargin="3dp"
app:contentPadding="10dp"
app:backgroundColor="#88BABABA"
app:backgroundColorPressed="#FFBABABA"
app:cornerRadius="3dp"
app:showArrow="true"

Description:

  • arrowGravity controls relative position of arrow. possible values are start,end and center. default is left.
  • arrowPosition controls poition of the arrow outside the box. possible values are right,left,top and bottom. default is left.
  • arrowMargin controls margin of arrow. If arrowPosition is left or right it controls top and bottom margin. else it controls left and right margin.
  • contentPadding adjusts padding of content within the box.
  • backgroundColor sets background color of ChatMessageView in normal mode including arrow.
  • backgroundColorPressed sets background color of ChatMessageView in pressed mode including arrow.
  • cornerRadius sets corner radius of the box.
  • showArrow shows / hides arrow from ChatMessageView.

================== developed to make programming easy.

by Himanshu Soni ([email protected])

chatmessageview's People

Contributors

himanshu-soni avatar johnjohndoe avatar

Watchers

James Cloos avatar Rehan Kodekar 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.