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

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>