diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java b/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java index 466ac2dd16..4393c1ee2e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java @@ -17,6 +17,7 @@ import android.widget.TextView; import androidx.annotation.ColorInt; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.graphics.drawable.DrawableCompat; import androidx.lifecycle.Observer; import com.airbnb.lottie.LottieAnimationView; @@ -126,6 +127,11 @@ public final class AudioView extends FrameLayout { setTint(typedArray.getColor(R.styleable.AudioView_foregroundTintColor, Color.WHITE)); + int backgroundTintColor = typedArray.getColor(R.styleable.AudioView_backgroundTintColor, Color.TRANSPARENT); + if (getBackground() != null && backgroundTintColor != Color.TRANSPARENT) { + DrawableCompat.setTint(getBackground(), backgroundTintColor); + } + this.waveFormPlayedBarsColor = typedArray.getColor(R.styleable.AudioView_waveformPlayedBarsColor, Color.WHITE); this.waveFormUnplayedBarsColor = typedArray.getColor(R.styleable.AudioView_waveformUnplayedBarsColor, Color.WHITE); this.waveFormThumbTint = typedArray.getColor(R.styleable.AudioView_waveformThumbTint, Color.WHITE); diff --git a/app/src/main/res/layout/conversation_activity_attachment_editor_stub.xml b/app/src/main/res/layout/conversation_activity_attachment_editor_stub.xml index 8ef04f0256..62f2988f53 100644 --- a/app/src/main/res/layout/conversation_activity_attachment_editor_stub.xml +++ b/app/src/main/res/layout/conversation_activity_attachment_editor_stub.xml @@ -1,61 +1,68 @@ + android:id="@+id/attachment_editor" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + android:visibility="gone" + tools:viewBindingIgnore="true"> + android:id="@+id/removable_media_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center"> + android:id="@+id/attachment_location" + android:layout_width="210dp" + android:layout_height="210dp" + android:layout_gravity="center_horizontal" + android:visibility="gone" /> + 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" + android:visibility="gone" + app:maxHeight="300dp" + app:maxWidth="300dp" + app:minHeight="100dp" + app:minWidth="100dp" /> + android:id="@+id/attachment_audio" + android:layout_width="210dp" + android:layout_height="wrap_content" + android:minHeight="72dp" + android:paddingTop="16dp" + android:paddingBottom="24dp" + android:paddingStart="12dp" + android:visibility="gone" + android:background="@drawable/rounded_rectangle_secondary_18" + app:backgroundTintColor="@color/signal_colorSurface2" + app:foregroundTintColor="@color/signal_colorOnSurfaceVariant" + app:progressAndPlayTint="@color/audio_play_pause_sent_background_tint" + app:waveformPlayedBarsColor="@color/audio_seek_bar_sent_played_color" + app:waveformThumbTint="@color/audio_seek_bar_sent_played_color" + app:waveformUnplayedBarsColor="@color/audio_seek_bar_sent_unplayed_color" /> + android:paddingStart="@dimen/message_bubble_horizontal_padding" + android:paddingTop="8dp" + android:paddingEnd="@dimen/message_bubble_horizontal_padding" + android:paddingBottom="8dp" + android:visibility="gone" + app:doc_captionColor="@color/signal_text_secondary" + app:doc_titleColor="@color/signal_text_primary" />