mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-30 21:52:28 +01:00
Implemented new camera capture flow.
A new, fullscreen camera capture flow that easily allows you to capture and edit a photo before sending it. Replaces the current half-screen camera button.
This commit is contained in:
@@ -1,89 +1,198 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:parentTag="android.widget.LinearLayout"
|
||||
tools:background="@color/core_light_60">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_save_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|left"
|
||||
android:src="@drawable/ic_check_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_save_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|left|start"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_check_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|right|end"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_text_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_text"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_draw_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_brush"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_highlight_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_highlight"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_sticker_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_sticker"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_undo_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_undo"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_delete_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_scribble_delete"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.widget.VerticalSlideColorPicker
|
||||
android:id="@+id/scribble_color_picker"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
app:pickerBorderWidth="4dp"
|
||||
app:pickerBorderColor="@color/white"
|
||||
app:pickerColors="@array/scribble_colors"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/scribble_color_palette"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right|top"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
android:id="@+id/scribble_compose_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_text_button"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_text_fields_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/compose_background_camera">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_draw_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_brush_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
|
||||
android:id="@+id/scribble_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" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_highlight_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/baseline_highlight_white_24"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/conversation_compose_height" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_sticker_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_tag_faces_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
<org.thoughtcrime.securesms.components.ComposeText
|
||||
style="@style/ComposeEditText"
|
||||
android:id="@+id/scribble_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:visibility="invisible"
|
||||
tools:hint="Send TextSecure message" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_undo_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_replay_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scribble_delete_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_delete_white_24dp"
|
||||
android:padding="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/scribble_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.scribbles.widget.VerticalSlideColorPicker
|
||||
android:id="@+id/scribble_color_picker"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
app:pickerBorderWidth="4dp"
|
||||
app:pickerBorderColor="@color/white"
|
||||
app:pickerColors="@array/scribble_colors"/>
|
||||
<org.thoughtcrime.securesms.components.SendButton
|
||||
android:id="@+id/scribble_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" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/scribble_color_palette"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scribble_characters_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:text="160/160 (1)" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/scribble_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"/>
|
||||
|
||||
</merge>
|
||||
Reference in New Issue
Block a user