Support for direct photo capture from app.

Make the send button toggle to an attach button when the
compose text and attachments are emmpty.

Part of #520
Closes #3186

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-05-18 10:26:32 -07:00
parent dc903e49af
commit fe4e2fcadb
18 changed files with 234 additions and 28 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -97,19 +97,37 @@
android:contentDescription="@string/conversation_activity__compose_description"
android:textColor="?conversation_editor_text_color" />
<org.thoughtcrime.securesms.components.SendButton
android:id="@+id/send_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__send"
android:nextFocusLeft="@+id/embedded_text_editor"
android:padding="12dp"
android:src="?conversation_transport_sms_indicator"
android:focusable="true"
android:clickable="false"
android:enabled="false" />
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/attach_button"
android:layout_gravity="center_vertical"
android:background="@drawable/touch_highlight_background"
android:padding="12dp"
android:src="?conversation_attach_file"
android:contentDescription="@string/ConversationActivity_add_attachment"
android:nextFocusLeft="@+id/embedded_text_editor"
android:layout_width="wrap_content"
android:layout_height="fill_parent"/>
<org.thoughtcrime.securesms.components.SendButton
android:id="@+id/send_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__send"
android:nextFocusLeft="@+id/embedded_text_editor"
android:padding="12dp"
android:src="?conversation_transport_sms_indicator"
android:focusable="true"
android:clickable="false"
android:enabled="false" />
</org.thoughtcrime.securesms.components.AnimatingToggle>
</LinearLayout>

View File

@@ -37,6 +37,7 @@
<attr name="conversation_attach_video" format="reference"/>
<attr name="conversation_attach_sound" format="reference"/>
<attr name="conversation_attach_contact_info" format="reference"/>
<attr name="conversation_attach_photo" format="reference"/>
<attr name="conversation_item_background" format="reference"/>
<attr name="conversation_item_received_background" format="reference" />

View File

@@ -50,6 +50,7 @@
<string name="AttachmentManager_cant_open_media_selection">Can\'t find an app to select media.</string>
<!-- AttachmentTypeSelectorAdapter -->
<string name="AttachmentTypeSelectorAdapter_take_photo">Take Photo</string>
<string name="AttachmentTypeSelectorAdapter_picture">Picture</string>
<string name="AttachmentTypeSelectorAdapter_video">Video</string>
<string name="AttachmentTypeSelectorAdapter_audio">Audio</string>

View File

@@ -53,6 +53,7 @@
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
<item name="conversation_attach_sound">@drawable/ic_volume_up_light</item>
<item name="conversation_attach_contact_info">@drawable/ic_account_box_light</item>
<item name="conversation_attach_photo">@drawable/ic_photo_camera_light</item>
<item name="conversation_item_background">@drawable/conversation_item_background</item>
<item name="conversation_item_received_background">@color/conversation_item_received_background_light</item>
@@ -188,6 +189,7 @@
<item name="conversation_attach_video">@drawable/ic_movie_creation_dark</item>
<item name="conversation_attach_sound">@drawable/ic_volume_up_dark</item>
<item name="conversation_attach_contact_info">@drawable/ic_account_box_dark</item>
<item name="conversation_attach_photo">@drawable/ic_photo_camera_dark</item>
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
<item name="menu_group_icon">@drawable/ic_group_white_24dp</item>