Voice notes

Closes #4610
Closes #3563
// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-11-18 14:52:26 -08:00
parent 4e8e8978f4
commit bfe4ad6c34
36 changed files with 1075 additions and 169 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -12,13 +12,17 @@
android:id="@+id/quick_attachment_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:clipToPadding="false"
android:clipChildren="false">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="?attr/actionBarSize"
android:gravity="bottom">
android:gravity="bottom"
android:clipToPadding="false"
android:clipChildren="false">
<org.thoughtcrime.securesms.components.reminder.ReminderView
android:id="@+id/reminder"
@@ -66,82 +70,7 @@
</FrameLayout>
<LinearLayout android:id="@+id/bottom_panel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:clickable="true"
android:background="?android:windowBackground"
android:padding="5dp">
<LinearLayout android:id="@+id/compose_bubble"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/sent_bubble">
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/emoji_toggle"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_gravity="bottom"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__emoji_toggle_description" />
<org.thoughtcrime.securesms.components.ComposeText
style="@style/ComposeEditText"
android:id="@+id/embedded_text_editor"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="37dp"
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>
<org.thoughtcrime.securesms.components.camera.HidingImageButton
android:id="@+id/quick_attachment_toggle"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_gravity="bottom"
android:src="?quick_camera_icon"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_toggle_description"
android:padding="10dp" />
</LinearLayout>
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/button_toggle"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/circle_tintable"
android:layout_gravity="bottom">
<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:src="@drawable/ic_attach_white_24dp"
android:contentDescription="@string/ConversationActivity_add_attachment"
android:nextFocusLeft="@+id/embedded_text_editor" />
<org.thoughtcrime.securesms.components.SendButton
android:id="@+id/send_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/conversation_activity__send"
android:nextFocusLeft="@+id/embedded_text_editor"
android:src="?conversation_transport_sms_indicator"
android:background="@drawable/circle_touch_highlight_background" />
</org.thoughtcrime.securesms.components.AnimatingToggle>
</LinearLayout>
<include layout="@layout/conversation_input_panel"/>
<Button android:id="@+id/unblock_button"
android:layout_width="fill_parent"

View File

@@ -0,0 +1,171 @@
<?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:tools="http://schemas.android.com/tools">
<org.thoughtcrime.securesms.components.InputPanel
android:id="@+id/bottom_panel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:clickable="true"
android:background="?android:windowBackground"
android:padding="5dp"
android:clipChildren="false"
android:clipToPadding="false">
<FrameLayout android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clipChildren="false"
android:clipToPadding="false">
<LinearLayout android:id="@+id/compose_bubble"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/sent_bubble"
android:clipChildren="false"
android:clipToPadding="false">
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/emoji_toggle"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_gravity="bottom"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__emoji_toggle_description" />
<org.thoughtcrime.securesms.components.ComposeText
style="@style/ComposeEditText"
android:id="@+id/embedded_text_editor"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="37dp"
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" >
<requestFocus />
</org.thoughtcrime.securesms.components.ComposeText>
<org.thoughtcrime.securesms.components.HidingLinearLayout
android:id="@+id/quick_attachment_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false">
<ImageButton
android:id="@+id/quick_camera_toggle"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_gravity="bottom"
android:src="?quick_camera_icon"
android:background="@drawable/touch_highlight_background"
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_toggle_description"
android:padding="10dp"/>
<org.thoughtcrime.securesms.components.MicrophoneRecorderView
android:id="@+id/recorder_view"
android:layout_width="37dp"
android:layout_height="37dp"
android:clipChildren="false"
android:clipToPadding="false">
<ImageButton
android:id="@+id/quick_audio_toggle"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_gravity="bottom"
android:src="?quick_mic_icon"
android:background="@null"
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_toggle_description"
android:padding="10dp"/>
<ImageView android:id="@+id/quick_audio_fab"
android:layout_width="74dp"
android:layout_height="74dp"
android:src="@drawable/ic_mic_white_48dp"
android:background="@drawable/circle_tintable"
android:backgroundTint="@color/red_400"
android:visibility="gone"
android:scaleType="center"/>
</org.thoughtcrime.securesms.components.MicrophoneRecorderView>
</org.thoughtcrime.securesms.components.HidingLinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/recording_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<TextView android:id="@+id/record_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="none"
android:layout_marginLeft="20dp"
android:text="00:00"
android:textColor="#61737b"
android:textSize="20dp"
android:singleLine="true"
android:visibility="gone"
tools:visibility="visible"/>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="true">
<TextView android:id="@+id/slide_to_cancel"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:drawableLeft="@drawable/ic_keyboard_arrow_left_grey600_24dp"
android:text="@string/conversation_input_panel__slide_to_cancel"
android:textAllCaps="true"
android:textColor="#61737b"
android:textSize="10sp"
android:ellipsize="none"
android:singleLine="true"
android:paddingLeft="20dp"
android:visibility="gone"
tools:visibility="visible"/>
</FrameLayout>
</LinearLayout>
</FrameLayout>
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/button_toggle"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/circle_tintable"
android:layout_gravity="bottom">
<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:src="@drawable/ic_attach_white_24dp"
android:contentDescription="@string/ConversationActivity_add_attachment"
android:nextFocusLeft="@+id/embedded_text_editor" />
<org.thoughtcrime.securesms.components.SendButton
android:id="@+id/send_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/conversation_activity__send"
android:nextFocusLeft="@+id/embedded_text_editor"
android:src="?conversation_transport_sms_indicator"
android:background="@drawable/circle_touch_highlight_background" />
</org.thoughtcrime.securesms.components.AnimatingToggle>
</org.thoughtcrime.securesms.components.InputPanel>
</merge>

View File

@@ -56,6 +56,7 @@
<attr name="emoji_category_symbol" format="reference"/>
<attr name="emoji_category_emoticons" format="reference"/>
<attr name="quick_camera_icon" format="reference"/>
<attr name="quick_mic_icon" format="reference"/>
<attr name="conversation_item_background" format="reference"/>
<attr name="conversation_item_bubble_background" format="reference|color"/>

View File

@@ -51,6 +51,9 @@
<string name="AttachmentTypeSelectorAdapter_audio">Audio</string>
<string name="AttachmentTypeSelectorAdapter_contact">Contact info</string>
<!-- AudioSlidePlayer -->
<string name="AudioSlidePlayer_error_playing_audio">Error playing audio!</string>
<!-- BlockedContactsActivity -->
<string name="BlockedContactsActivity_blocked_contacts">Blocked contacts</string>
@@ -128,6 +131,8 @@
<string name="ConversationActivity_unblock">Unblock</string>
<string name="ConversationActivity_attachment_exceeds_size_limits">Attachment exceeds size limits for the type of message you\'re sending.</string>
<string name="ConversationActivity_quick_camera_unavailable">Camera unavailable</string>
<string name="ConversationActivity_unable_to_record_audio">Unable to record audio!</string>
<string name="ConversationActivity_error_sending_voice_note">Error sending voice note...</string>
<!-- ConversationFragment -->
<string name="ConversationFragment_message_details">Message details</string>
@@ -275,6 +280,9 @@
<string name="ImportFragment_no_encrypted_backup_found">No encrypted backup found!</string>
<string name="ImportFragment_restore_complete">Restore complete!</string>
<!-- InputPanel -->
<string name="InputPanel_tap_and_hold_to_record_a_voice_note_release_to_send">Tap and hold to record a voice note, release to send</string>
<!-- InviteActivity -->
<string name="InviteActivity_share">Share</string>
<string name="InviteActivity_send_sms">Send SMS</string>
@@ -620,6 +628,9 @@
<string name="conversation_activity__attachment_thumbnail">Attachment Thumbnail</string>
<string name="conversation_activity__quick_attachment_drawer_toggle_description">Toggle attachment drawer</string>
<!-- conversation_input_panel -->
<string name="conversation_input_panel__slide_to_cancel">SLIDE TO CANCEL</string>
<!-- conversation_item -->
<string name="conversation_item__mms_downloading_description">Media message downloading</string>
<string name="conversation_item__mms_image_description">Media message</string>
@@ -1132,7 +1143,6 @@
<string name="device_link_fragment__link_device">Link device</string>
<string name="device_list_fragment__link_new_device">Link new device</string>
<!-- EOF -->
</resources>

View File

@@ -147,6 +147,7 @@
<item name="conversation_item_received_text_secondary_color">#BFffffff</item>
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
@@ -272,6 +273,7 @@
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_dark</item>
<item name="quick_camera_icon">@drawable/quick_camera_dark</item>
<item name="quick_mic_icon">@drawable/ic_mic_white_24dp</item>
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
<item name="menu_group_icon">@drawable/ic_group_white_24dp</item>