mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 10:35:19 +00:00
6fa7eca60b
Update our media send flow to allow users to send multiple images/videos at once. This change includes: - New in-app media picker flow. - Ability to caption images and videos. - Image editing tools are made more prominent in the flow. - Some fixes to the image editing tools.
183 lines
8.2 KiB
XML
183 lines
8.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@color/core_black">
|
|
|
|
<org.thoughtcrime.securesms.components.ControllableViewPager
|
|
android:id="@+id/mediasend_pager"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/mediasend_playback_controls_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:animateLayoutChanges="true"
|
|
android:layout_gravity="top"/>
|
|
|
|
<org.thoughtcrime.securesms.components.InputAwareLayout
|
|
android:id="@+id/mediasend_hud"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:orientation="vertical"
|
|
android:background="@color/transparent_black_70">
|
|
|
|
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
|
android:id="@+id/mediasend_caption"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
style="@style/Signal.Text.Body"
|
|
android:paddingTop="11dp"
|
|
android:paddingBottom="11dp"
|
|
android:drawableLeft="@drawable/ic_add_caption"
|
|
android:drawableStart="@drawable/ic_add_caption"
|
|
android:drawablePadding="6dp"
|
|
android:maxLines="3"
|
|
android:maxLength="240"
|
|
android:hint="@string/MediaSendActivity_add_a_caption"
|
|
android:background="@null"/>
|
|
|
|
<android.support.v7.widget.RecyclerView
|
|
android:id="@+id/mediasend_media_rail"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
tools:layout_height="64dp"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/mediasend_compose_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:orientation="horizontal"
|
|
android:paddingBottom="6dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/mediasend_add_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:paddingTop="8dp"
|
|
android:paddingBottom="8dp"
|
|
android:src="@drawable/ic_add_photo"
|
|
android:background="?selectableItemBackgroundBorderless"
|
|
android:visibility="gone"
|
|
tools:visibility="visible"/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginLeft="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:paddingLeft="10dp"
|
|
android:paddingStart="10dp"
|
|
android:orientation="horizontal"
|
|
android:background="@drawable/compose_background_camera">
|
|
|
|
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
|
|
android:id="@+id/mediasend_emoji_toggle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="@dimen/conversation_compose_height"
|
|
android:layout_gravity="bottom"
|
|
android:paddingLeft="4dp"
|
|
android:paddingStart="4dp"
|
|
android:paddingRight="6dp"
|
|
android:paddingEnd="6dp"
|
|
android:background="?selectableItemBackgroundBorderless"
|
|
android:contentDescription="@string/conversation_activity__emoji_toggle_description" />
|
|
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="@dimen/conversation_compose_height" />
|
|
|
|
<org.thoughtcrime.securesms.components.ComposeText
|
|
style="@style/ComposeEditText"
|
|
android:id="@+id/mediasend_compose_text"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_weight="1"
|
|
android:nextFocusForward="@+id/send_button"
|
|
android:nextFocusRight="@+id/send_button"
|
|
tools:hint="Send TextSecure message" >
|
|
<requestFocus />
|
|
</org.thoughtcrime.securesms.components.ComposeText>
|
|
|
|
</LinearLayout>
|
|
|
|
<FrameLayout
|
|
android:id="@+id/mediasend_send_button_bkg"
|
|
android:layout_width="@dimen/conversation_compose_height"
|
|
android:layout_height="@dimen/conversation_compose_height"
|
|
android:layout_marginLeft="12dp"
|
|
android:layout_marginStart="12dp"
|
|
android:layout_gravity="bottom"
|
|
android:background="@drawable/circle_tintable"
|
|
tools:backgroundTint="@color/core_blue">
|
|
|
|
<org.thoughtcrime.securesms.components.SendButton
|
|
android:id="@+id/mediasend_send_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:paddingTop="6dp"
|
|
android:paddingRight="6dp"
|
|
android:paddingBottom="6dp"
|
|
android:paddingLeft="11dp"
|
|
android:scaleType="fitCenter"
|
|
android:contentDescription="@string/conversation_activity__send"
|
|
android:src="?conversation_transport_sms_indicator"
|
|
android:background="@drawable/circle_touch_highlight_background" />
|
|
|
|
</FrameLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/mediasend_characters_left"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:paddingBottom="6dp"
|
|
android:visibility="gone"
|
|
tools:visibility="visible"
|
|
tools:text="160/160 (1)" />
|
|
|
|
<ViewStub
|
|
android:id="@+id/mediasend_emoji_drawer_stub"
|
|
android:layout="@layout/scribble_fragment_emojidrawer_stub"
|
|
android:inflatedId="@+id/emoji_drawer"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</org.thoughtcrime.securesms.components.InputAwareLayout>
|
|
|
|
<!--<com.pnikosis.materialishprogress.ProgressWheel-->
|
|
<!--android:id="@+id/mediasend_progress_wheel"-->
|
|
<!--android:layout_width="70dp"-->
|
|
<!--android:layout_height="70dp"-->
|
|
<!--android:visibility="gone"-->
|
|
<!--android:layout_gravity="center"-->
|
|
<!--app:matProg_barColor="@color/white"-->
|
|
<!--app:matProg_progressIndeterminate="true" />-->
|
|
|
|
</FrameLayout> |