MessageView

Additional

Language
Java
Version
v5.0.19 (Apr 29, 2020)
Created
Mar 17, 2019
Updated
May 23, 2020
Owner
Akshay Masram (TutorialsAndroid)
Contributor
Akshay Masram (TutorialsAndroid)
1
Activity
Badge
Generate
Download
Source code

Advertisement

MessageView

Heatic Debate App Download Now

And Don't Forget To Follow Me On Instagram

Follow me on instagram to stay up-to-date https://instagram.com/akshaysunilmasram

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

Library name change from Postui to MessageView.We have removed postui api instead of postui you can use message view api read the below docs.

Library Available at JitPack.io

Latest version of this library is migrated to androidx

Hire-Me

Are you having trouble in your android projects then let me help you with it just Email me. I love my users, so feel free to visit http://asm.life

Features

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

Sample Screen

See the below demo.This demo shows how the Kinda App is using message view library.

Installation

add gradle dependency to your dependency list:

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
         implementation 'com.github.TutorialsAndroid:MessageView:v5.0.19'
}

Use

  1. Include MessageView in your xml of adapter view with content inside.
<com.developer.messageview.MessageView
 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" />

        <!-- ... -->

</com.developer.messageview.MessageView>

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|false"

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 MessageView in normal mode including arrow.
  • backgroundColorPressed sets background color of MessageView in pressed mode including arrow.
  • cornerRadius sets corner radius of the box.
  • showArrow shows / hides arrow from MessageView.

developed to make programming easy.

by Akshay Sunil Masram (akshaysunilmasram@yahoo.com)