mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-02-05 22:09:29 +00:00
182 lines
No EOL
8.2 KiB
XML
182 lines
No EOL
8.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<data>
|
|
<import type="android.view.View"/>
|
|
<variable
|
|
name="closeBubbleClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="openAppClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="sendMessageClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.activities.main.chat.viewmodels.ChatRoomViewModel" />
|
|
<variable
|
|
name="chatSendingViewModel"
|
|
type="org.linphone.activities.main.chat.viewmodels.ChatMessageSendingViewModel" />
|
|
</data>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/backgroundColor">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/top_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/main_activity_top_bar_size"
|
|
android:background="?attr/lightToolbarBackgroundColor"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:contentDescription="@string/content_description_close_bubble"
|
|
android:onClick="@{closeBubbleClickListener}"
|
|
android:visibility="invisible"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.2"
|
|
android:padding="15dp"
|
|
android:background="?attr/button_background_drawable"
|
|
android:src="@drawable/collapse_default"
|
|
app:tint="?attr/drawableTintColor" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="0.4"
|
|
android:gravity="center"
|
|
android:orientation="vertical"
|
|
android:paddingLeft="5dp">
|
|
|
|
<org.linphone.views.MarqueeTextView
|
|
android:text="@{viewModel.oneToOneChatRoom ? (viewModel.contact.fullName ?? viewModel.displayName) : viewModel.subject}"
|
|
style="@style/toolbar_small_title_font"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
|
|
<org.linphone.views.MarqueeTextView
|
|
android:text="@{viewModel.participants}"
|
|
android:visibility="@{viewModel.oneToOneChatRoom ? View.GONE : View.VISIBLE}"
|
|
style="@style/toolbar_small_title_font"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:onClick="@{openAppClickListener}"
|
|
android:contentDescription="@string/content_description_open_app"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="0.2"
|
|
android:padding="15dp"
|
|
android:background="?attr/button_background_drawable"
|
|
app:tint="?attr/drawableTintColor"
|
|
android:src="@drawable/fullscreen_default"/>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/footer"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentBottom="true"
|
|
android:gravity="center_vertical"
|
|
android:background="?attr/backgroundColor"
|
|
android:orientation="horizontal">
|
|
|
|
<org.linphone.activities.main.chat.views.RichEditText
|
|
android:id="@+id/message"
|
|
android:enabled="@{!chatSendingViewModel.isReadOnly}"
|
|
android:text="@={chatSendingViewModel.textToSend}"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginBottom="5dp"
|
|
android:layout_marginLeft="5dp"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/resizable_text_field"
|
|
android:imeOptions="flagNoExtractUi"
|
|
android:inputType="textShortMessage|textMultiLine|textAutoComplete|textAutoCorrect|textCapSentences"
|
|
android:maxLines="6"
|
|
android:padding="5dp"
|
|
android:textColor="@color/black_color"
|
|
android:textCursorDrawable="@null" />
|
|
|
|
<RelativeLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
|
|
<ImageView
|
|
android:id="@+id/send_message"
|
|
android:onClick="@{sendMessageClickListener}"
|
|
android:enabled="@{chatSendingViewModel.sendMessageEnabled && !chatSendingViewModel.isReadOnly}"
|
|
android:contentDescription="@string/content_description_send_message"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:padding="5dp"
|
|
android:src="@drawable/chat_send_message" />
|
|
|
|
<ImageView
|
|
android:visibility="@{viewModel.chatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:enabled="@{chatSendingViewModel.sendMessageEnabled && !chatSendingViewModel.isReadOnly}"
|
|
android:contentDescription="@string/content_description_ephemeral_message"
|
|
android:clickable="false"
|
|
android:layout_width="20dp"
|
|
android:layout_height="wrap_content"
|
|
android:adjustViewBounds="true"
|
|
android:layout_alignRight="@id/send_message"
|
|
android:layout_alignBottom="@id/send_message"
|
|
android:padding="5dp"
|
|
android:src="@drawable/ephemeral_messages" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/remote_composing"
|
|
android:text="@{viewModel.composingList, default=@string/chat_remote_is_composing}"
|
|
android:visibility="@{viewModel.remoteIsComposing ? View.VISIBLE : View.INVISIBLE}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_above="@id/footer"
|
|
android:layout_marginLeft="5dp"
|
|
style="@style/standard_small_text_font" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/chat_messages_list"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_above="@id/remote_composing"
|
|
android:layout_below="@+id/top_bar"
|
|
android:cacheColorHint="@color/transparent_color"
|
|
android:choiceMode="multipleChoice"
|
|
android:divider="@android:color/transparent"
|
|
android:listSelector="@color/transparent_color"
|
|
android:transcriptMode="normal" />
|
|
|
|
<ImageView
|
|
android:src="@{viewModel.securityLevelIcon, default=@drawable/security_alert_indicator}"
|
|
android:visibility="@{viewModel.encryptedChatRoom ? View.VISIBLE : View.GONE}"
|
|
android:contentDescription="@{viewModel.securityLevelContentDescription}"
|
|
android:adjustViewBounds="true"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/top_bar"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginRight="8dp" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</layout> |