高仿qq聊天介面

來源:互聯網
上載者:User

高仿qq聊天介面,給有需要的人,介面效果如下:



真心覺得做介面非常痛苦,給有需要的朋友。


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="返回"            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="發送"            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>

下面是布局檔案中用到的各種資源

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


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.