Support for an audio view to allow in-app playback of audio.
Closes #4270 // FREEBIE
BIN
res/drawable-hdpi/ic_download_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
res/drawable-hdpi/ic_pause_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 831 B |
BIN
res/drawable-hdpi/ic_play_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 786 B |
BIN
res/drawable-mdpi/ic_download_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable-mdpi/ic_pause_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
res/drawable-mdpi/ic_play_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
res/drawable-xhdpi/ic_download_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
res/drawable-xhdpi/ic_pause_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 959 B |
BIN
res/drawable-xhdpi/ic_play_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
res/drawable-xxhdpi/ic_download_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
res/drawable-xxhdpi/ic_pause_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
res/drawable-xxhdpi/ic_play_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable-xxxhdpi/ic_download_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
res/drawable-xxxhdpi/ic_pause_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
res/drawable-xxxhdpi/ic_play_circle_fill_white_48dp.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
91
res/layout/audio_view.xml
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge 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">
|
||||
|
||||
<LinearLayout android:id="@+id/audio_widget_container"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||
android:id="@+id/control_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center">
|
||||
|
||||
<com.pnikosis.materialishprogress.ProgressWheel
|
||||
android:id="@+id/download_progress"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
app:matProg_barColor="@color/white"
|
||||
app:matProg_linearProgress="true"
|
||||
app:matProg_spinSpeed="0.333"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView android:id="@+id/play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_play_circle_fill_white_48dp"
|
||||
android:contentDescription="Play"/>
|
||||
|
||||
<ImageView android:id="@+id/pause"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_pause_circle_fill_white_48dp"
|
||||
android:contentDescription="Pause"/>
|
||||
|
||||
<ImageView android:id="@+id/download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_download_circle_fill_white_48dp"
|
||||
android:contentDescription="Download"/>
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
|
||||
<SeekBar android:id="@+id/seek"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:minWidth="210dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView android:id="@+id/timestamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="76dip"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?conversation_item_sent_text_secondary_color"
|
||||
android:textSize="@dimen/conversation_item_date_text_size"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:autoLink="none"
|
||||
android:visibility="gone"
|
||||
tools:text="00:15"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
@@ -37,13 +37,32 @@
|
||||
android:background="?android:windowBackground"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/attachment_thumbnail"
|
||||
android:layout_width="230dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@string/conversation_activity__attachment_thumbnail"
|
||||
app:backgroundColorHint="?conversation_background" />
|
||||
<org.thoughtcrime.securesms.components.RemovableMediaView
|
||||
android:id="@+id/removable_media_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/attachment_thumbnail"
|
||||
android:layout_width="230dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/conversation_activity__attachment_thumbnail"
|
||||
app:backgroundColorHint="?conversation_background" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.AudioView
|
||||
android:id="@+id/attachment_audio"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="15dp"
|
||||
app:tintColor="@color/grey_500"/>
|
||||
|
||||
</org.thoughtcrime.securesms.components.RemovableMediaView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@@ -1,12 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.thoughtcrime.securesms.ConversationItem android:id="@+id/conversation_item"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="10dip"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/conversation_item_background"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<org.thoughtcrime.securesms.ConversationItem
|
||||
android:id="@+id/conversation_item"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="10dip"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/conversation_item_background"
|
||||
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">
|
||||
|
||||
<TextView android:id="@+id/group_message_status"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -53,7 +55,15 @@
|
||||
android:contentDescription="@string/conversation_item__mms_image_description"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_video_light"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="gone" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.AudioView
|
||||
android:id="@+id/audio_view"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:tintColor="@color/white"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/conversation_item_body"
|
||||
|
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.thoughtcrime.securesms.ConversationItem
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/conversation_item"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/conversation_item_background">
|
||||
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:id="@+id/conversation_item"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/conversation_item_background">
|
||||
|
||||
<RelativeLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -67,6 +68,13 @@
|
||||
tools:src="@drawable/ic_video_light"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.AudioView
|
||||
android:id="@+id/audio_view"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:tintColor="@color/grey_500"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/conversation_item_body"
|
||||
android:autoLink="all"
|
||||
|
@@ -3,4 +3,6 @@
|
||||
android:id="@+id/remove_image_button"
|
||||
android:layout_width="@dimen/media_bubble_remove_button_size"
|
||||
android:layout_height="@dimen/media_bubble_remove_button_size"
|
||||
android:src="@drawable/conversation_attachment_close_circle" />
|
||||
android:layout_gravity="top|right"
|
||||
android:src="@drawable/conversation_attachment_close_circle"
|
||||
android:visibility="gone"/>
|
@@ -16,9 +16,4 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout="@layout/transfer_controls_stub" />
|
||||
|
||||
<ViewStub android:id="@+id/remove_button_stub"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|right"
|
||||
android:layout="@layout/thumbnail_view_remove_button" />
|
||||
</merge>
|
||||
|
@@ -134,4 +134,9 @@
|
||||
<declare-styleable name="ThumbnailView">
|
||||
<attr name="backgroundColorHint" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AudioView">
|
||||
<attr name="tintColor" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|