Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this is a main layout of chatting activity
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#FFFFFF"
- android:orientation="vertical">
- <RelativeLayout
- android:id="@+id/llSend"
- android:layout_width="match_parent"
- android:layout_height="80dp"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="12dp"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="0dp"
- android:background="#FFFFFF">
- <Button
- android:id="@+id/btSend"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_alignParentRight="true"
- android:background="@drawable/button_send" />
- <ImageView
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:background="@drawable/image_picker"
- android:id="@+id/activity_chat_imagview_gallery" />
- <EditText
- android:id="@+id/etMessage"
- android:layout_width="match_parent"
- android:layout_height="fill_parent"
- android:layout_alignBottom="@+id/btSend"
- android:layout_toRightOf="@+id/activity_chat_imagview_gallery"
- android:layout_toLeftOf="@+id/btSend"
- android:background="@drawable/edittext_bg"
- android:hint="Write a message..."
- android:imeOptions="actionSend"
- android:textSize="25sp"
- android:inputType="textShortMessage"
- android:paddingLeft="7dp"
- android:singleLine="true" />
- </RelativeLayout>
- <RelativeLayout
- android:id="@+id/chat_rly_actionbar"
- android:layout_width="match_parent"
- android:layout_height="80dp"
- android:background="#6E4A92"
- android:orientation="horizontal">
- <Button
- android:id="@+id/chat_button_back"
- android:layout_width="80dp"
- android:layout_height="80dp"
- android:layout_alignParentLeft="true"
- android:layout_centerInParent="true"
- android:background="@drawable/back_icn_nav" />
- <TextView
- android:id="@+id/chat_personal_actionbar_username"
- android:layout_width="match_parent"
- android:layout_height="80dp"
- android:layout_centerHorizontal="true"
- android:layout_centerInParent="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="100dp"
- android:ellipsize="end"
- android:gravity="center"
- android:maxLines="1"
- android:padding="10dp"
- android:singleLine="true"
- android:text="Nils"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="@color/white"
- android:textSize="40dp"
- android:textStyle="bold" />
- </RelativeLayout>
- <Button
- android:id="@+id/activity_chat_btn_bookhotel"
- android:text="Book your Hotel Now"
- android:layout_marginTop="0dp"
- android:layout_below="@+id/chat_rly_actionbar"
- android:layout_width="match_parent"
- android:layout_height="80dp"
- android:textColor="@android:color/white"
- android:textSize="20sp" />
- <View
- android:id="@+id/view"
- android:layout_width="fill_parent"
- android:layout_height="1dp"
- android:layout_above="@+id/llSend"
- android:layout_marginBottom="10dp"
- android:background="#C8C8C8" />
- <ListView
- android:id="@+id/lvChat"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_above="@+id/view"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/activity_chat_btn_bookhotel"
- android:layout_marginBottom="10dp"
- android:background="#FFFFFF"
- android:divider="@null"
- android:dividerHeight="0dp"
- android:transcriptMode="alwaysScroll" />
- <TextView
- android:id="@+id/chat_tv_isnewuser"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:text="Hello..!"
- android:textColor="@android:color/black"
- android:textSize="30sp" />
- </RelativeLayout>
- //here is my list item of current user
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#FFFFFF"
- android:orientation="horizontal">
- <com.nevada_fortunes.connect_me.RoundedImageView
- android:id="@+id/chat_item_ivProfileMe"
- android:layout_width="90dp"
- android:layout_height="90dp"
- android:layout_alignParentLeft="true"
- android:layout_gravity="right"
- android:layout_marginLeft="10dp"
- android:layout_marginTop="5dp"
- android:src="@drawable/defualt" />
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@+id/chat_item_ivProfileMe">
- <ImageView
- android:layout_width="45dp"
- android:layout_height="45dp"
- android:background="@drawable/chat_other_arrow"
- android:layout_marginLeft="1dp"
- android:layout_marginTop="10dp"
- android:layout_alignParentLeft="true" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="25dp"
- android:paddingRight="10dp"
- android:layout_marginRight="7dp"
- android:layout_marginTop="10dp"
- android:background="@drawable/chat_me_back"
- android:orientation="vertical">
- <LinearLayout
- android:id="@+id/chat_lly_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginLeft="10dp"
- android:layout_marginTop="10dp"
- android:layout_marginBottom="10dp">
- <TextView
- android:id="@+id/chat_item_tv_me_message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Hello Nils..!"
- android:textColor="@android:color/white"
- android:textSize="30sp" />
- <TextView
- android:id="@+id/chat_item_tv_me_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:layout_marginBottom="0dp"
- android:layout_marginRight="5dp"
- android:layout_marginTop="0dp"
- android:layout_marginLeft="5dp"
- android:text="Time"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#D7D7D7"
- android:textSize="23sp" />
- </LinearLayout>
- </LinearLayout>
- </RelativeLayout>
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement