There are many popular android chatting and messaging application available in Google Play Store. Chat/messaging app like Facebook Messenger, Viber, Twitter, WhatsApp, Google Hangouts, Kik, Skype, SnapChat, IM+, EvolveSMS, BlackBerry Messenger and Line are some of the most popular android and iPhone/IOS application. These applications have different UI/UX (User Interface/User Experience) design with similar and different features. If you want to develop such types of android application, you need to focus user interface and user experience not only programming part. So in this tutorial, you will learn to make simple android chat/messaging application UI design with XML.

Android app UI is created with XML and here we will make chat application UI with android TextView, ImageView, EditText and so on.

Android Music App XML UI Design
Android FlexboxLayout Tutorial with Example
Bar Chart XML UI Design For Android

Android Example: How to Build an Android Chat/Messaging App UI Design with XML

Let’s start by creating new android application with project name Android Chat Messaging App UI Design and with blank activity.

1. Creating XML Drawable File

Create two XML drawable file rounded_corner.xml and rounded_corner1.xml to create chat application ui design. In these two file we will create rounded corner rectangle with different background color for two users. Add solid color, stock color and width, corners radius, padding inside shape of drawable XML file. Following is the complete XML code of rounded_corner.xml and rounded_corner1.xml file.



2. XML Layout File

Create type_message_area.xml file inside res/layout directory and add EditText and ImageView inside LinearLayout. Don’t forgot to add ndroid:layout_weight attribute to EditText and ImageVIew and android:gravity bottom to LInearLayout. type_message_area.xml file will look like below.


Now open your XML layout file and add ScrollView, RelativeLayout, Linearayout and include type_message_area at the bottom of root layout LinearLayout like below. I have also added other more views like ImageView and TextView with different attributes. Don’t forget to add android:layout_weight attribute in ScrollView and include of type_message_area. There are many other important attributes in TextView, ImageView and layouts which will look like below.


Following are the necessary images, just download and add in drawable folder.


3. Java Activity File

Following is the default code of java activity file.


And colors.xml file will look like below.


Screenshots of Output:

Chat/Messaging App XML UI Design for Android

Chat/Messaging App XML UI Design for Android

Chat/Messaging App XML UI Design for Android

You have done all things. Now, run your Chat/Messaging App XML UI Design for Android application, which will look like above screenshots. You can add other things according to your needs this is only sample project to create chat or messaging app xml ui.

4. Download Complete Source Code

You can download complete example project source code of Chat/Messaging App XML UI Design from GitHub.

Post a Comment

Powered by Blogger.