mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Refactor input panel to use constraint layout.
This commit is contained in:
committed by
Alex Hart
parent
067b3513b7
commit
2f9498e137
@@ -27,6 +27,7 @@ import androidx.annotation.DimenRes;
|
||||
import androidx.annotation.MainThread;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
@@ -78,7 +79,7 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class InputPanel extends LinearLayout
|
||||
public class InputPanel extends ConstraintLayout
|
||||
implements AudioRecordingHandler,
|
||||
KeyboardAwareLinearLayout.OnKeyboardShownListener,
|
||||
EmojiEventListener,
|
||||
@@ -101,10 +102,10 @@ public class InputPanel extends LinearLayout
|
||||
private SendButton sendButton;
|
||||
private View recordingContainer;
|
||||
private View recordLockCancel;
|
||||
private ViewGroup composeContainer;
|
||||
private View composeContainer;
|
||||
private View editMessageCancel;
|
||||
private ImageView editMessageThumbnail;
|
||||
private View editMessageHeader;
|
||||
private View editMessageTitle;
|
||||
|
||||
private MicrophoneRecorderView microphoneRecorderView;
|
||||
private SlideToCancel slideToCancel;
|
||||
@@ -163,7 +164,7 @@ public class InputPanel extends LinearLayout
|
||||
TimeUnit.HOURS.toSeconds(1),
|
||||
() -> microphoneRecorderView.cancelAction(false));
|
||||
this.editMessageCancel = findViewById(R.id.input_panel_exit_edit_mode);
|
||||
this.editMessageHeader = findViewById(R.id.edit_message_compose_header);
|
||||
this.editMessageTitle = findViewById(R.id.edit_message_title);
|
||||
this.editMessageThumbnail = findViewById(R.id.edit_message_thumbnail);
|
||||
|
||||
this.recordLockCancel.setOnClickListener(v -> microphoneRecorderView.cancelAction(true));
|
||||
@@ -454,13 +455,15 @@ public class InputPanel extends LinearLayout
|
||||
private void updateEditModeUi() {
|
||||
if (inEditMessageMode()) {
|
||||
ViewUtil.focusAndShowKeyboard(composeText);
|
||||
editMessageHeader.setVisibility(View.VISIBLE);
|
||||
editMessageTitle.setVisibility(View.VISIBLE);
|
||||
editMessageThumbnail.setVisibility(View.VISIBLE);
|
||||
editMessageCancel.setVisibility(View.VISIBLE);
|
||||
if (listener != null) {
|
||||
listener.onEnterEditMode();
|
||||
}
|
||||
} else {
|
||||
editMessageHeader.setVisibility(View.GONE);
|
||||
editMessageTitle.setVisibility(View.GONE);
|
||||
editMessageThumbnail.setVisibility(View.GONE);
|
||||
editMessageCancel.setVisibility(View.GONE);
|
||||
if (listener != null) {
|
||||
listener.onExitEditMode();
|
||||
|
||||
@@ -7,288 +7,294 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/signal_background_primary"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical">
|
||||
android:clipToPadding="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/input_panel_sticker_suggestion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="90dp"
|
||||
android:background="@color/signal_background_secondary"
|
||||
android:visibility="gone" />
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/input_panel_exit_edit_mode"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/circle_tintable"
|
||||
android:backgroundTint="@color/signal_colorOnSurfaceVariant"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/symbol_x_24"
|
||||
app:tint="@color/signal_colorOnPrimary"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@id/compose_bubble"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/compose_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_toggle"
|
||||
app:layout_constraintStart_toEndOf="@id/input_panel_exit_edit_mode"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_panel_sticker_suggestion" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/edit_message_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/InputPanel_edit_message"
|
||||
android:textAppearance="@style/Signal.Text.LabelLarge"
|
||||
android:textColor="@color/signal_colorOnSurface"
|
||||
android:visibility="gone"
|
||||
app:drawableStartCompat="@drawable/symbol_edit_compact_16"
|
||||
app:drawableTint="@color/signal_colorOnSurface"
|
||||
app:layout_constraintEnd_toStartOf="@+id/edit_message_thumbnail"
|
||||
app:layout_constraintStart_toStartOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toTopOf="@id/compose_bubble"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/edit_message_thumbnail"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/edit_message_title"
|
||||
app:layout_constraintEnd_toEndOf="@id/compose_bubble"
|
||||
app:layout_constraintStart_toEndOf="@id/edit_message_title"
|
||||
app:layout_constraintTop_toTopOf="@id/edit_message_title"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Signal.EditMessageMediaThumbnail"
|
||||
tools:src="@tools:sample/avatars"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.QuoteView
|
||||
android:id="@+id/quote_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="@+id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit_message_title"
|
||||
app:message_type="preview"
|
||||
app:quote_colorPrimary="@color/signal_text_primary"
|
||||
app:quote_colorSecondary="@color/signal_text_primary"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.LinkPreviewView
|
||||
android:id="@+id/link_preview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="@+id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@+id/quote_view"
|
||||
app:linkpreview_type="compose" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/compose_bubble_top_elements"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="edit_message_title,edit_message_thumbnail,quote_view,link_preview" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
|
||||
android:id="@+id/emoji_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/conversation_activity__emoji_toggle_description"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements"
|
||||
app:tint="@color/signal_colorOnSurfaceVariant" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.ComposeText
|
||||
android:id="@+id/embedded_text_editor"
|
||||
style="@style/ComposeEditText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:nextFocusRight="@+id/send_button"
|
||||
android:nextFocusForward="@+id/send_button"
|
||||
android:paddingVertical="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toStartOf="@id/attachment_barrier"
|
||||
app:layout_constraintStart_toEndOf="@id/emoji_toggle"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements"
|
||||
tools:hint="Send TextSecure message">
|
||||
|
||||
<requestFocus />
|
||||
</org.thoughtcrime.securesms.components.ComposeText>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/attachment_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="start"
|
||||
app:constraint_referenced_ids="quick_attachment_toggle,inline_attachment_container" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
||||
android:id="@+id/quick_attachment_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="right|end"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toEndOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/input_panel_exit_edit_mode"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="bottom"
|
||||
<ImageButton
|
||||
android:id="@+id/quick_camera_toggle"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_toggle_camera_description"
|
||||
android:foreground="?selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_camera_24"
|
||||
app:tint="@color/signal_colorOnSurfaceVariant" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.MicrophoneRecorderView
|
||||
android:id="@+id/recorder_view"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/circle_tintable"
|
||||
android:backgroundTint="@color/signal_colorOnSurfaceVariant"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/symbol_x_24"
|
||||
app:tint="@color/signal_colorOnPrimary" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="2dp">
|
||||
tools:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/compose_bubble"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/compose_background"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/microphone_recorder_view" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/edit_message_compose_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="gone">
|
||||
</org.thoughtcrime.securesms.components.MicrophoneRecorderView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/InputPanel_edit_message"
|
||||
android:textAppearance="@style/Signal.Text.LabelLarge"
|
||||
android:textColor="@color/signal_colorOnSurface"
|
||||
app:drawableStartCompat="@drawable/symbol_edit_compact_16"
|
||||
app:drawableTint="@color/signal_colorOnSurface" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/edit_message_thumbnail"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Signal.EditMessageMediaThumbnail"/>
|
||||
</org.thoughtcrime.securesms.components.HidingLinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
||||
android:id="@+id/inline_attachment_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="right|end"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toEndOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements">
|
||||
|
||||
<org.thoughtcrime.securesms.components.QuoteView
|
||||
android:id="@+id/quote_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:visibility="gone"
|
||||
app:message_type="preview"
|
||||
app:quote_colorPrimary="@color/signal_text_primary"
|
||||
app:quote_colorSecondary="@color/signal_text_primary"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.LinkPreviewView
|
||||
android:id="@+id/link_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:visibility="gone"
|
||||
app:linkpreview_type="compose" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
|
||||
android:id="@+id/emoji_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/conversation_activity__emoji_toggle_description"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:tint="@color/signal_colorOnSurfaceVariant" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/conversation_compose_height" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.ComposeText
|
||||
android:id="@+id/embedded_text_editor"
|
||||
style="@style/ComposeEditText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:nextFocusRight="@+id/send_button"
|
||||
android:nextFocusForward="@+id/send_button"
|
||||
tools:hint="Send TextSecure message"
|
||||
tools:visibility="invisible">
|
||||
|
||||
<requestFocus />
|
||||
</org.thoughtcrime.securesms.components.ComposeText>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
||||
android:id="@+id/quick_attachment_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right|end"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/quick_camera_toggle"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_toggle_camera_description"
|
||||
android:scaleType="fitCenter"
|
||||
app:tint="@color/signal_colorOnSurfaceVariant"
|
||||
app:srcCompat="@drawable/ic_camera_24" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.MicrophoneRecorderView
|
||||
android:id="@+id/recorder_view"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<include layout="@layout/microphone_recorder_view" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.MicrophoneRecorderView>
|
||||
|
||||
</org.thoughtcrime.securesms.components.HidingLinearLayout>
|
||||
|
||||
<org.thoughtcrime.securesms.components.HidingLinearLayout
|
||||
android:id="@+id/inline_attachment_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right|end"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/inline_attachment_button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/ConversationActivity_add_attachment"
|
||||
android:scaleType="fitCenter"
|
||||
app:tint="@color/signal_colorOnSurface"
|
||||
app:srcCompat="@drawable/ic_plus_24" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.HidingLinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/recording_layout" />
|
||||
|
||||
<org.thoughtcrime.securesms.conversation.VoiceNoteDraftView
|
||||
android:id="@+id/voice_note_draft_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||
android:id="@+id/button_toggle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
<ImageButton
|
||||
android:id="@+id/inline_attachment_button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/circle_tintable">
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/ConversationActivity_add_attachment"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_plus_24"
|
||||
app:tint="@color/signal_colorOnSurface" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/attach_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/ConversationActivity_add_attachment"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:tint="@color/conversation_send_button_tint"
|
||||
app:srcCompat="@drawable/symbol_plus_24" />
|
||||
</org.thoughtcrime.securesms.components.HidingLinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/send_edit_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/ConversationActivity_send_edit"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:tint="@color/conversation_send_button_tint"
|
||||
app:srcCompat="@drawable/symbol_check_24" />
|
||||
<include
|
||||
layout="@layout/recording_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toEndOf="@id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SendButton
|
||||
android:id="@+id/send_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/conversation_activity__send"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:tint="@color/conversation_send_button_tint"
|
||||
app:srcCompat="@drawable/ic_send_unlock_24" />
|
||||
<org.thoughtcrime.securesms.conversation.VoiceNoteDraftView
|
||||
android:id="@+id/voice_note_draft_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/conversation_compose_height"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toEndOf="@id/compose_bubble"
|
||||
app:layout_constraintStart_toStartOf="@id/compose_bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/compose_bubble_top_elements"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||
android:id="@+id/button_toggle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/circle_tintable"
|
||||
app:layout_constraintBottom_toBottomOf="@id/compose_bubble"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/attach_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/ConversationActivity_add_attachment"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/symbol_plus_24"
|
||||
app:tint="@color/conversation_send_button_tint" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/send_edit_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/ConversationActivity_send_edit"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/symbol_check_24"
|
||||
app:tint="@color/conversation_send_button_tint" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SendButton
|
||||
android:id="@+id/send_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:contentDescription="@string/conversation_activity__send"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:padding="9dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_send_unlock_24"
|
||||
app:tint="@color/conversation_send_button_tint" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
|
||||
</LinearLayout>
|
||||
</org.thoughtcrime.securesms.components.InputPanel>
|
||||
|
||||
Reference in New Issue
Block a user