Replace People & Options with the home profile and search screens, and attach media from an in-conversation gallery sheet that avoids the system picker flash. Co-authored-by: Cursor <cursoragent@cursor.com>
570 lines
14 KiB
XML
570 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
|
||
<!--
|
||
|
||
Copyright (C) 2015 The Android Open Source Project
|
||
|
||
Copyright (C) 2024 The LineageOS Project
|
||
|
||
|
||
|
||
Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
||
you may not use this file except in compliance with the License.
|
||
|
||
You may obtain a copy of the License at
|
||
|
||
|
||
|
||
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
|
||
|
||
Unless required by applicable law or agreed to in writing, software
|
||
|
||
distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
||
See the License for the specific language governing permissions and
|
||
|
||
limitations under the License.
|
||
|
||
-->
|
||
|
||
<com.android.messaging.ui.conversation.ComposeMessageView
|
||
|
||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||
|
||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||
|
||
xmlns:tools="http://schemas.android.com/tools"
|
||
|
||
android:id="@+id/message_compose_view_container"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:orientation="vertical" >
|
||
|
||
|
||
|
||
<!-- Note it may seem off to have the layout_weight="1" on the compose bar and attachment view
|
||
|
||
when it's the media picker that expands, but this is correct because weight also works when
|
||
|
||
there's not enough space. Any views with positive weights will be shrunk to make space.
|
||
|
||
When the media picker goes full screen, it fills the parent, leaving no room for the compose
|
||
|
||
bar -->
|
||
|
||
<LinearLayout
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:layout_weight="1"
|
||
|
||
android:clipChildren="false"
|
||
|
||
android:clipToPadding="false"
|
||
|
||
android:orientation="vertical">
|
||
|
||
|
||
|
||
<View
|
||
|
||
android:id="@+id/top_margin"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="0dp" />
|
||
|
||
|
||
|
||
<include layout="@layout/attachment_preview"
|
||
|
||
android:id="@+id/attachment_draft_view"
|
||
|
||
style="@style/ComposeMessageViewDraftViewStyle"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="0dp"
|
||
|
||
android:layout_marginBottom="4dp"
|
||
|
||
android:layout_weight="1"
|
||
|
||
android:visibility="gone" />
|
||
|
||
|
||
|
||
<RelativeLayout
|
||
|
||
android:id="@+id/subject_view"
|
||
|
||
style="@style/SubjectViewStyle"
|
||
|
||
android:paddingTop="@dimen/compose_message_subject_top_padding"
|
||
|
||
android:paddingBottom="@dimen/compose_message_subject_bottom_padding"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:visibility="gone"
|
||
|
||
android:clipChildren="false"
|
||
|
||
android:clipToPadding="false"
|
||
|
||
android:orientation="horizontal">
|
||
|
||
|
||
|
||
<com.android.messaging.ui.PlainTextEditText
|
||
|
||
android:background="@drawable/subject_editor_bubble"
|
||
|
||
android:id="@+id/compose_subject_text"
|
||
|
||
style="@style/ConversationComposeSubjectText"
|
||
|
||
android:hint="@string/compose_message_view_subject_hint_text"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:imeOptions="flagNoExtractUi" />
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/delete_subject_button"
|
||
|
||
style="@style/AttachmentPreviewCloseButtonStyle"
|
||
|
||
android:layout_width="wrap_content"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:background="@null"
|
||
|
||
android:src="@drawable/ic_remove_light"
|
||
|
||
android:translationY="@dimen/compose_message_subject_cancel_top_offset"
|
||
|
||
android:contentDescription="@string/delete_subject_content_description" />
|
||
|
||
|
||
|
||
</RelativeLayout>
|
||
|
||
|
||
|
||
<!-- Compose bar stays above the icon grid; the grid grows below and lifts the input. -->
|
||
|
||
<LinearLayout
|
||
|
||
android:id="@+id/home_compose_bottom_stack"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:clipChildren="false"
|
||
|
||
android:clipToOutline="false"
|
||
|
||
android:orientation="vertical">
|
||
|
||
|
||
|
||
<!-- Google Messages–style compose row: pill (+ | text | emoji | gallery) + voice/send -->
|
||
|
||
<LinearLayout
|
||
|
||
android:id="@+id/home_conversation_compose_bar"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:background="@color/home_bg"
|
||
|
||
android:baselineAligned="false"
|
||
|
||
android:clipChildren="false"
|
||
|
||
android:clipToPadding="false"
|
||
|
||
android:gravity="bottom"
|
||
|
||
android:orientation="horizontal"
|
||
|
||
android:paddingStart="@dimen/looply_space_md"
|
||
|
||
android:paddingTop="@dimen/looply_space_sm"
|
||
|
||
android:paddingEnd="@dimen/looply_space_md"
|
||
|
||
android:paddingBottom="@dimen/looply_space_md">
|
||
|
||
|
||
|
||
<LinearLayout
|
||
|
||
android:layout_width="0dp"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:layout_gravity="bottom"
|
||
|
||
android:layout_weight="1"
|
||
|
||
android:orientation="vertical">
|
||
|
||
|
||
|
||
<LinearLayout
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="@dimen/home_conversation_compose_pill_height"
|
||
|
||
android:background="@drawable/home_bg_compose_pill"
|
||
|
||
android:gravity="center_vertical"
|
||
|
||
android:orientation="horizontal"
|
||
|
||
android:paddingStart="@dimen/looply_space_xs"
|
||
|
||
android:paddingEnd="@dimen/looply_space_xs">
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:layout_width="@dimen/home_compose_attach_size"
|
||
|
||
android:layout_height="@dimen/home_compose_attach_size"
|
||
|
||
android:layout_marginStart="@dimen/looply_space_xs">
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/attach_media_button"
|
||
|
||
android:layout_width="@dimen/home_compose_attach_size"
|
||
|
||
android:layout_height="@dimen/home_compose_attach_size"
|
||
|
||
android:background="@drawable/home_bg_compose_attach_circle"
|
||
|
||
android:contentDescription="@string/attachMediaButtonContentDescription"
|
||
|
||
android:padding="@dimen/home_compose_attach_icon_padding"
|
||
|
||
android:scaleType="centerInside"
|
||
|
||
app:srcCompat="@drawable/ic_home_compose_plus"
|
||
|
||
app:tint="@color/home_accent" />
|
||
|
||
</FrameLayout>
|
||
|
||
|
||
|
||
<com.android.messaging.ui.PlainTextEditText
|
||
|
||
android:id="@+id/compose_message_text"
|
||
|
||
android:layout_width="0dp"
|
||
|
||
android:layout_height="match_parent"
|
||
|
||
android:layout_weight="1"
|
||
|
||
android:background="@android:color/transparent"
|
||
|
||
android:gravity="center_vertical"
|
||
|
||
android:hint="@string/home_conversation_compose_hint"
|
||
|
||
android:imeOptions="actionSend|flagNoEnterAction|flagNoExtractUi"
|
||
|
||
android:includeFontPadding="false"
|
||
|
||
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
|
||
|
||
android:maxLines="4"
|
||
|
||
android:minHeight="0dp"
|
||
|
||
android:paddingStart="@dimen/looply_space_xs"
|
||
|
||
android:paddingEnd="@dimen/looply_space_xs"
|
||
|
||
android:textColor="@color/home_text_primary"
|
||
|
||
android:textColorHint="@color/home_text_secondary"
|
||
|
||
android:textSize="16sp" />
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/home_compose_emoji_button"
|
||
|
||
android:layout_width="36dp"
|
||
|
||
android:layout_height="36dp"
|
||
|
||
android:background="@android:color/transparent"
|
||
|
||
android:contentDescription="@string/home_compose_emoji_content_description"
|
||
|
||
android:padding="6dp"
|
||
|
||
android:scaleType="centerInside"
|
||
|
||
app:srcCompat="@drawable/ic_home_emoji"
|
||
|
||
app:tint="@color/home_text_primary" />
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/home_compose_gallery_button"
|
||
|
||
android:layout_width="36dp"
|
||
|
||
android:layout_height="36dp"
|
||
|
||
android:layout_marginEnd="@dimen/looply_space_xs"
|
||
|
||
android:background="@android:color/transparent"
|
||
|
||
android:contentDescription="@string/home_compose_gallery_content_description"
|
||
|
||
android:padding="6dp"
|
||
|
||
android:scaleType="centerInside"
|
||
|
||
app:srcCompat="@drawable/ic_home_image_line"
|
||
|
||
app:tint="@color/home_text_primary" />
|
||
|
||
</LinearLayout>
|
||
|
||
|
||
|
||
<TextView
|
||
|
||
android:id="@+id/message_body_size"
|
||
|
||
style="@style/ComposeMessageViewMessageBodySizeStyle"
|
||
|
||
android:layout_width="wrap_content"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:maxLines="1"
|
||
|
||
android:singleLine="true"
|
||
|
||
android:visibility="gone" />
|
||
|
||
</LinearLayout>
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:layout_width="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_height="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_gravity="bottom"
|
||
|
||
android:layout_marginStart="@dimen/looply_space_sm">
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/home_conversation_voice_button"
|
||
|
||
android:layout_width="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_height="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_gravity="center"
|
||
|
||
android:background="@drawable/home_bg_compose_voice_circle"
|
||
|
||
android:contentDescription="@string/home_conversation_voice_content_description"
|
||
|
||
android:padding="12dp"
|
||
|
||
android:scaleType="centerInside"
|
||
|
||
app:srcCompat="@drawable/ic_home_voice_wave"
|
||
|
||
app:tint="@color/home_accent" />
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:id="@+id/home_conversation_send_column"
|
||
|
||
android:layout_width="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_height="@dimen/home_conversation_compose_voice_size"
|
||
|
||
android:layout_gravity="center"
|
||
|
||
android:visibility="gone">
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:id="@+id/home_conversation_send_button_container"
|
||
|
||
android:layout_width="@dimen/home_conversation_compose_send_size"
|
||
|
||
android:layout_height="@dimen/home_conversation_compose_send_size"
|
||
|
||
android:layout_gravity="center">
|
||
|
||
|
||
|
||
<com.android.messaging.ui.conversation.SimIconView
|
||
|
||
android:id="@+id/self_send_icon"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="match_parent"
|
||
|
||
android:clickable="true"
|
||
|
||
android:importantForAccessibility="no"
|
||
|
||
app:contactIconSize="small"
|
||
|
||
app:reveal="true" />
|
||
|
||
|
||
|
||
<ImageButton
|
||
|
||
android:id="@+id/send_message_button"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="match_parent"
|
||
|
||
android:background="@drawable/home_bg_compose_send_circle"
|
||
|
||
android:contentDescription="@string/sendButtonContentDescription"
|
||
|
||
android:padding="10dp"
|
||
|
||
android:scaleType="centerInside"
|
||
|
||
android:src="@drawable/ic_send_light"
|
||
|
||
android:visibility="gone"
|
||
|
||
app:tint="@android:color/white" />
|
||
|
||
</FrameLayout>
|
||
|
||
|
||
|
||
<TextView
|
||
|
||
android:id="@+id/mms_indicator"
|
||
|
||
style="@style/MmsIndicatorStyle"
|
||
|
||
android:layout_width="wrap_content"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:layout_gravity="bottom|center_horizontal"
|
||
|
||
android:maxLines="1"
|
||
|
||
android:singleLine="true"
|
||
|
||
android:text="@string/mms_text"
|
||
|
||
android:visibility="gone" />
|
||
|
||
</FrameLayout>
|
||
|
||
</FrameLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:id="@+id/home_compose_attachment_sheet_container"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="0dp"
|
||
|
||
android:clipChildren="true"
|
||
|
||
android:visibility="gone">
|
||
|
||
<include
|
||
layout="@layout/home_mediapicker_sheet"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_gravity="top" />
|
||
</FrameLayout>
|
||
|
||
|
||
|
||
<FrameLayout
|
||
|
||
android:id="@+id/mediapicker_container"
|
||
|
||
android:layout_width="match_parent"
|
||
|
||
android:layout_height="wrap_content"
|
||
|
||
android:clipChildren="true"
|
||
|
||
android:visibility="gone" />
|
||
|
||
</LinearLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
|
||
|
||
</com.android.messaging.ui.conversation.ComposeMessageView>
|
||
|