Fixed chat room top bar while in call
This commit is contained in:
parent
c1ba03a138
commit
fc69a0e2c9
5 changed files with 32 additions and 367 deletions
|
@ -1,113 +0,0 @@
|
|||
<?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="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:background="@drawable/list_selector">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete_chatroom"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible" android:layout_alignParentTop="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<include layout="@layout/contact_avatar"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:layout_alignBottom="@id/sipUri"
|
||||
style="@style/font2"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sipUri"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/font6"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/date"
|
||||
android:layout_marginRight="30dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unreadMessages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:contentDescription="@string/content_description_unread_chat_message"
|
||||
style="@style/font18"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@id/lastMessageLayout"
|
||||
android:layout_below="@id/sipUri"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessageSender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font11"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessage"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font11"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/lastMessageFileTransfer"
|
||||
android:src="@drawable/chat_file_message"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,111 +0,0 @@
|
|||
<?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="80dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:background="@drawable/list_selector">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete_chatroom"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<include layout="@layout/contact_avatar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_layout"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
style="@style/font2"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sipUri"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/font6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="30dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unreadMessages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:contentDescription="@string/content_description_unread_chat_message"
|
||||
style="@style/font18"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:layout_above="@+id/lastMessageLayout"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@id/lastMessageLayout"
|
||||
android:layout_below="@id/sipUri"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessageSender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font11"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessage"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="30dp"
|
||||
style="@style/font11"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/lastMessageFileTransfer"
|
||||
android:src="@drawable/chat_file_message"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,112 +0,0 @@
|
|||
<?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="100dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:background="@drawable/list_selector">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/delete_chatroom"
|
||||
android:button="@drawable/checkbox"
|
||||
android:contentDescription="@string/content_description_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<include layout="@layout/contact_avatar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_layout"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
style="@style/font2"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sipUri"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:fadingEdge="horizontal"
|
||||
android:maxLines="1"
|
||||
style="@style/font6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="30dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/unreadMessages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:contentDescription="@string/content_description_unread_chat_message"
|
||||
style="@style/font18"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:layout_above="@+id/lastMessageLayout"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@id/lastMessageLayout"
|
||||
android:layout_below="@id/sipUri"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessageSender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/font11"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastMessage"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="30dp"
|
||||
style="@style/font11"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/lastMessageFileTransfer"
|
||||
android:src="@drawable/chat_file_message"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -63,16 +63,6 @@
|
|||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/group_infos"
|
||||
android:src="@drawable/chat_room_group_infos"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_conversation_infos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_to_call"
|
||||
android:src="@drawable/call_back"
|
||||
|
@ -84,6 +74,16 @@
|
|||
android:visibility="gone"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/group_infos"
|
||||
android:src="@drawable/chat_room_group_infos"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_conversation_infos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:src="@drawable/edit_list_button"
|
||||
|
|
|
@ -594,9 +594,6 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
Core core = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (core == null || mChatRoom == null) return;
|
||||
|
||||
if (core.getCallsNb() > 0) {
|
||||
mBackToCallButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBackToCallButton.setVisibility(View.GONE);
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) {
|
||||
mCallButton.setVisibility(View.VISIBLE);
|
||||
|
@ -616,6 +613,10 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mRoomLabel.setText(mChatRoom.getSubject());
|
||||
mParticipantsLabel.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (core.getCallsNb() > 0) {
|
||||
mBackToCallButton.setVisibility(View.VISIBLE);
|
||||
mCallButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (mChatRoom.hasBeenLeft()) {
|
||||
|
|
Loading…
Reference in a new issue