High imitation QQ chat interface

Source: Internet
Author: User


A high imitation QQ chat interface is provided to people in need. The interface effect is as follows:



I really feel that it is very painful to make the interface for friends who need it.


Chat. xml


<? xml version = "1.0" encoding = "utf-8"?>
<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
    android: id = "@ + id / LinearLayout1"
    android: layout_width = "fill_parent"
    android: layout_height = "fill_parent"
    android: orientation = "vertical">
    <RelativeLayout
        android: id = "@ + id / rl_layout"
        android: layout_width = "fill_parent"
        android: layout_height = "wrap_content"
        android: layout_weight = "0.01"
        android: background = "@ drawable / title_bar"
        android: orientation = "vertical">
        <Button
            android: id = "@ + id / chat_back"
            android: layout_width = "70dp"
            android: layout_height = "wrap_content"
            android: layout_centerVertical = "true"
            android: layout_marginLeft = "10dp"
            android: background = "@ drawable / selector_btn_back"
            android: paddingLeft = "10dp"
            android: text = "return"
            android: textColor = "# ffffff"
            android: textSize = "18sp" />
        <TextView
            android: id = "@ + id / chat_name"
            android: layout_width = "wrap_content"
            android: layout_height = "wrap_content"
            android: layout_centerInParent = "true"
            android: textColor = "# ffffff"
            android: textSize = "20.0sp" />
    </ RelativeLayout>
    <ListView
        android: id = "@ + id / chat_listview"
        android: layout_width = "fill_parent"
        android: layout_height = "fill_parent"
        android: layout_weight = "10"
        android: cacheColorHint = "# 00000000"
        android: background = "# FFFFFF"
        android: divider = "@ null"
        android: dividerHeight = "5dp"
        android: scrollbars = "none">
    </ ListView>
    <RelativeLayout
        android: id = "@ + id / rl_bottom"
        android: layout_width = "fill_parent"
        android: layout_height = "wrap_content"
        android: layout_weight = "0.8"
        android: background = "@ drawable / layout_bg1">
        <Button
            android: id = "@ + id / chat_send"
            android: layout_width = "60dp"
            android: layout_height = "40dp"
            android: layout_alignParentRight = "true"
            android: layout_centerVertical = "true"
            android: layout_marginRight = "10dp"
            android: background = "@ drawable / chat_send_button_bg"
            android: text = "send"
            android: textSize = "20sp" />
        <EditText
            android: id = "@ + id / chat_editmessage"
            android: layout_width = "fill_parent"
            android: layout_height = "40dp"
            android: layout_centerVertical = "true"
            android: layout_marginLeft = "10dp"
            android: layout_marginRight = "10dp"
            android: layout_toLeftOf = "@ id / chat_send"
            android: background = "@ drawable / edittext1"
            android: singleLine = "true"
            android: textSize = "18sp" />
    </ RelativeLayout>
</ LinearLayout>

The following are the various resources used in the layout file.


Title_bar.9.png




Selector_btn_back.xml


<?xml version="1.0" encoding="utf-8"?>
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@drawable/top_back_leftpress" />
    <item android:drawable="@drawable/top_back_left" />
</selector>

Top_back_left.9.png



Top_back_leftpress.9.png


Layout_bg1.9.png


Chat_send_button_bg.xml


<?xml version="1.0" encoding="utf-8"?>
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="false" android:state_pressed="false" android:drawable="@drawable/chat_bottom_send_normal" />
    <item android:state_pressed="true" android:drawable="@drawable/chat_bottom_send_pressed" />
    <item android:state_focused="true" android:drawable="@drawable/chat_bottom_send_pressed" />
    <item android:drawable="@drawable/chat_bottom_send_normal" />
</selector>



Chat_bottom_send_pressed.9.png



Chat_bottom_send_normal.9.png



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.