ChatMessageView


Source link: https://github.com/himanshu-soni/ChatMessageView

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

Installation

add gradle dependency to your dependency list:

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

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:cmv_backgroundColor="#88BABABA"
  app:cmv_backgroundColorPressed="#FFBABABA"
  app:cmv_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:cmv_arrowGravity="start|end|center" app:cmv_arrowPosition="right|left|top|bottom" app:cmv_arrowMargin="3dp" app:cmv_contentPadding="10dp" app:cmv_backgroundColor="#88BABABA" app:cmv_backgroundColorPressed="#FFBABABA" app:cmv_cornerRadius="3dp" app:cmv_showArrow="true|false"

Description:

  • cmv_arrowGravity controls relative position of arrow. possible values are start, end and center. default is left.
  • cmv_arrowPosition controls poition of the arrow outside the box. possible values are right, left, top and bottom. default is left.
  • cmv_arrowMargin controls margin of arrow. If cmv_arrowPosition is left or right it controls top and bottom margin. else it controls left and right margin.
  • cmv_contentPadding adjusts padding of content within the box.
  • cmv_backgroundColor sets background color of ChatMessageView in normal mode including arrow.
  • cmv_backgroundColorPressed sets background color of ChatMessageView in pressed mode including arrow.
  • cmv_cornerRadius sets corner radius of the box.
  • cmv_showArrow shows / hides arrow from ChatMessageView.

developed to make programming easy.

by Himanshu Soni ( [email protected])

Resources

Recycler View Library with built-in Item click listeners, drag and swipe functionality.

Android library to integrate oauth login flow into app using github v3 api.

Multiple items adapter made easy, including headers and footers.

SQLite ORM for Android. Simple and easy-to-use.

Realm is a mobile database that runs directly inside phones, tablets or wearables.

This repository holds the library to allow Sync client under Android Realm Object Server to encrypt the token saved in SharedPreferences, once the user is authenticated. The encryption uses the Android KeyStore available to generate and uses RSA and AES keys for encryption operations.

StripeCardEntry makes a simple and elegant credit card entry UI of Stripe and ports this to the Android Platform. In a nutshell StripeCardEntry has:

  • Support for Visa, Mastercard & American Express cards.
  • Number validation using Luhn algorithm ensures the user will not enter an invalid number.
  • Date validation ensures the user can only enter a valid expiry date.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes