|
|
@ -2,125 +2,126 @@ |
|
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
|
|
|
xmlns:tools="http://schemas.android.com/tools" |
|
|
|
xmlns:tools="http://schemas.android.com/tools" |
|
|
|
|
|
|
|
android:layout_width="fill_parent" |
|
|
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:orientation="vertical" |
|
|
|
android:orientation="vertical" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:padding="@dimen/dp_10"> |
|
|
|
android:layout_height="wrap_content"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 发送时间 --> |
|
|
|
|
|
|
|
<TextView |
|
|
|
<TextView |
|
|
|
android:id="@+id/tv_send_time" |
|
|
|
android:id="@+id/tv_send_time" |
|
|
|
android:text="08:00" |
|
|
|
|
|
|
|
android:textColor="@color/black50" |
|
|
|
|
|
|
|
android:textSize="@dimen/sp_12" |
|
|
|
|
|
|
|
android:layout_gravity="center_horizontal" |
|
|
|
|
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content"/> |
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:layout_gravity="center_horizontal" |
|
|
|
<!-- 左边消息 --> |
|
|
|
android:layout_marginBottom="5dp" |
|
|
|
<LinearLayout |
|
|
|
android:text="@string/app_name" |
|
|
|
|
|
|
|
android:textSize="@dimen/sp_8" |
|
|
|
|
|
|
|
android:paddingLeft="3dip" |
|
|
|
|
|
|
|
android:paddingRight="3dip" |
|
|
|
|
|
|
|
android:textColor="#aaaaaa"/> |
|
|
|
|
|
|
|
<RelativeLayout |
|
|
|
android:id="@+id/layout_chatting_left" |
|
|
|
android:id="@+id/layout_chatting_left" |
|
|
|
android:layout_marginTop="@dimen/dp_5" |
|
|
|
android:layout_width="fill_parent" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_height="wrap_content"> |
|
|
|
android:layout_marginTop="5dp" > |
|
|
|
<!-- 左侧头像 --> |
|
|
|
|
|
|
|
<ImageView |
|
|
|
<ImageView |
|
|
|
android:id="@+id/iv_avatar_left" |
|
|
|
android:id="@+id/iv_avatar_left" |
|
|
|
android:layout_width="@dimen/dp_40" |
|
|
|
android:layout_width="@dimen/dp_38" |
|
|
|
android:layout_height="@dimen/dp_40" |
|
|
|
android:layout_height="@dimen/dp_38" |
|
|
|
android:layout_marginTop="@dimen/dp_10" |
|
|
|
android:layout_alignParentTop="true" |
|
|
|
android:layout_marginLeft="@dimen/dp_10" |
|
|
|
android:src="@drawable/icon_links_avatar" |
|
|
|
android:src="@drawable/icon_links_avatar"/> |
|
|
|
android:focusable="false"/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 左侧聊天框 --> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/chatting_frame_left" |
|
|
|
android:id="@+id/chatting_frame_left" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginTop="@dimen/dp_10" |
|
|
|
android:layout_marginStart="10dp" |
|
|
|
android:gravity="left" |
|
|
|
android:layout_marginEnd="55dp" |
|
|
|
android:minWidth="@dimen/dp_60" |
|
|
|
android:layout_toEndOf="@+id/iv_avatar_left" |
|
|
|
|
|
|
|
android:gravity="center" |
|
|
|
|
|
|
|
android:minWidth="60dp" |
|
|
|
android:background="@drawable/skin_messages_left_bubble" |
|
|
|
android:background="@drawable/skin_messages_left_bubble" |
|
|
|
android:orientation="vertical"> |
|
|
|
android:orientation="vertical"> |
|
|
|
<FrameLayout |
|
|
|
<FrameLayout |
|
|
|
android:layout_margin="@dimen/dp_2" |
|
|
|
android:layout_margin="2dp" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content"> |
|
|
|
android:layout_height="match_parent" |
|
|
|
|
|
|
|
tools:ignore="UselessParent"> |
|
|
|
|
|
|
|
<ImageView |
|
|
|
|
|
|
|
android:id="@+id/chatting_left_img" |
|
|
|
|
|
|
|
android:layout_width="150dp" |
|
|
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:adjustViewBounds="true" |
|
|
|
|
|
|
|
android:contentDescription="@string/app_name" |
|
|
|
|
|
|
|
tools:src="@mipmap/ico_dialogx_error"/> |
|
|
|
<TextView |
|
|
|
<TextView |
|
|
|
android:id="@+id/chatting_left_text" |
|
|
|
android:id="@+id/chatting_left_text" |
|
|
|
|
|
|
|
android:layout_margin="5dp" |
|
|
|
|
|
|
|
android:textSize="@dimen/sp_13" |
|
|
|
|
|
|
|
android:textStyle="bold" |
|
|
|
android:singleLine="false" |
|
|
|
android:singleLine="false" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:layout_margin="@dimen/dp_5" |
|
|
|
|
|
|
|
android:gravity="left" |
|
|
|
|
|
|
|
android:layout_gravity="center" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:maxWidth="@dimen/dp_230" |
|
|
|
android:gravity="start" |
|
|
|
android:layout_alignParentEnd="true" |
|
|
|
android:textColor="#444444" |
|
|
|
android:text="都可以使用RippleDrawable来达到水波纹特效,而且必须处于可点击状态," |
|
|
|
android:text="@string/app_name" |
|
|
|
android:textSize="@dimen/sp_14"/> |
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:layout_width="wrap_content"/> |
|
|
|
</FrameLayout> |
|
|
|
</FrameLayout> |
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |
|
|
|
</RelativeLayout> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 右边消息 --> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
<RelativeLayout |
|
|
|
android:id="@+id/layout_chatting_right" |
|
|
|
android:id="@+id/layout_chatting_right" |
|
|
|
android:layout_marginTop="@dimen/dp_5" |
|
|
|
android:layout_width="fill_parent" |
|
|
|
android:gravity="end" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_marginTop="5dp" > |
|
|
|
android:layout_height="wrap_content"> |
|
|
|
<ImageView |
|
|
|
<!-- 右侧聊天框 --> |
|
|
|
android:id="@+id/iv_avatar_right" |
|
|
|
|
|
|
|
android:layout_width="@dimen/dp_38" |
|
|
|
|
|
|
|
android:layout_height="@dimen/dp_38" |
|
|
|
|
|
|
|
android:layout_alignParentEnd="true" |
|
|
|
|
|
|
|
android:layout_alignParentTop="true" |
|
|
|
|
|
|
|
android:src="@drawable/icon_links_avatar" |
|
|
|
|
|
|
|
android:focusable="false"/> |
|
|
|
<LinearLayout |
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/chatting_frame_right" |
|
|
|
android:id="@+id/chatting_frame_right" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginTop="@dimen/dp_10" |
|
|
|
android:layout_marginStart="55dp" |
|
|
|
android:gravity="center" |
|
|
|
android:layout_marginEnd="10dp" |
|
|
|
android:maxWidth="@dimen/dp_60" |
|
|
|
android:layout_toStartOf="@+id/iv_avatar_right" |
|
|
|
android:background="@drawable/skin_messages_right_bubble" |
|
|
|
android:background="@drawable/skin_messages_right_bubble" |
|
|
|
|
|
|
|
android:gravity="center" |
|
|
|
|
|
|
|
android:minWidth="60dp" |
|
|
|
android:orientation="vertical"> |
|
|
|
android:orientation="vertical"> |
|
|
|
<FrameLayout |
|
|
|
<FrameLayout |
|
|
|
android:layout_margin="@dimen/dp_2" |
|
|
|
android:layout_margin="2dp" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content"> |
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
tools:ignore="UselessParent"> |
|
|
|
|
|
|
|
<ImageView |
|
|
|
|
|
|
|
android:visibility="visible" |
|
|
|
|
|
|
|
android:id="@+id/chatting_right_img" |
|
|
|
|
|
|
|
android:layout_width="150dp" |
|
|
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:adjustViewBounds="true" |
|
|
|
|
|
|
|
android:contentDescription="@string/app_name" |
|
|
|
|
|
|
|
tools:src="@mipmap/ico_dialogx_error"/> |
|
|
|
<TextView |
|
|
|
<TextView |
|
|
|
android:id="@+id/chatting_rigth_text" |
|
|
|
android:id="@+id/chatting_right_text" |
|
|
|
|
|
|
|
android:layout_margin="5dp" |
|
|
|
|
|
|
|
android:textSize="@dimen/sp_13" |
|
|
|
|
|
|
|
android:textStyle="bold" |
|
|
|
android:singleLine="false" |
|
|
|
android:singleLine="false" |
|
|
|
android:maxWidth="@dimen/dp_230" |
|
|
|
|
|
|
|
android:gravity="right" |
|
|
|
|
|
|
|
android:layout_gravity="center" |
|
|
|
android:layout_gravity="center" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:gravity="right" |
|
|
|
|
|
|
|
android:textColor="#444444" |
|
|
|
|
|
|
|
android:text="@string/app_name" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_margin="@dimen/dp_5" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:text="测试内容,任何view处于可点击状态,都可以使用RippleDrawable来达到水波纹特效,而且必须处于可点击状态,才会出现波纹动画效果" |
|
|
|
tools:ignore="RtlHardcoded" /> |
|
|
|
android:textSize="@dimen/sp_14"/> |
|
|
|
|
|
|
|
</FrameLayout> |
|
|
|
</FrameLayout> |
|
|
|
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<!-- 右侧头像 --> |
|
|
|
|
|
|
|
<ImageView |
|
|
|
|
|
|
|
android:id="@+id/iv_avatar_right" |
|
|
|
|
|
|
|
android:layout_width="@dimen/dp_40" |
|
|
|
|
|
|
|
android:layout_height="@dimen/dp_40" |
|
|
|
|
|
|
|
android:layout_marginTop="@dimen/dp_10" |
|
|
|
|
|
|
|
android:layout_marginRight="@dimen/dp_5" |
|
|
|
|
|
|
|
android:src="@drawable/icon_links_avatar"/> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
</RelativeLayout> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 系统消息内容 默认隐藏 --> |
|
|
|
|
|
|
|
<TextView |
|
|
|
|
|
|
|
android:visibility="gone" |
|
|
|
|
|
|
|
android:id="@+id/tv_system_msg" |
|
|
|
|
|
|
|
android:layout_width="wrap_content" |
|
|
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
android:layout_gravity="center_horizontal" |
|
|
|
|
|
|
|
android:layout_margin="@dimen/dp_10" |
|
|
|
|
|
|
|
android:textColor="#eeeeee" |
|
|
|
|
|
|
|
android:textSize="@dimen/sp_12" |
|
|
|
|
|
|
|
android:text="系统消息" |
|
|
|
|
|
|
|
android:background="@drawable/icon_btn_swipeable_bg1" |
|
|
|
|
|
|
|
android:paddingTop="@dimen/dp_2" |
|
|
|
|
|
|
|
android:paddingBottom="@dimen/dp_2" |
|
|
|
|
|
|
|
android:paddingLeft="@dimen/dp_5" |
|
|
|
|
|
|
|
android:paddingRight="@dimen/dp_5"/> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
</LinearLayout> |