Skip to content

Commit 17bf391

Browse files
style: 3/fine
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent 9435be0 commit 17bf391

File tree

4 files changed

+30
-19
lines changed

4 files changed

+30
-19
lines changed

app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingVoiceMessageViewHolder.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,14 @@ class OutcomingVoiceMessageViewHolder(outcomingView: View) :
173173
else -> null
174174
}
175175

176-
readStatusDrawableInt?.let { drawableInt ->
177-
AppCompatResources.getDrawable(context!!, drawableInt)?.let {
176+
if (readStatusDrawableInt != null) {
177+
AppCompatResources.getDrawable(context!!, readStatusDrawableInt)?.let {
178178
binding.checkMark.setImageDrawable(it)
179179
viewThemeUtils.talk.themeMessageCheckMark(binding.checkMark)
180180
}
181+
binding.checkMark.visibility = View.VISIBLE
182+
} else {
183+
binding.checkMark.visibility = View.GONE
181184
}
182185

183186
binding.checkMark.contentDescription = readStatusContentDescriptionString

app/src/main/java/com/nextcloud/talk/ui/WaveformSeekBar.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ class WaveformSeekBar : AppCompatSeekBar {
114114
}
115115

116116
companion object {
117-
private const val DEFAULT_BAR_WIDTH: Int = 4
118-
private const val MAX_HEIGHT_DIVISOR: Float = 4.0f
119-
private const val WIDTH_DIVISOR = 20f
117+
private const val DEFAULT_BAR_WIDTH: Int = 3
118+
private const val MAX_HEIGHT_DIVISOR: Float = 2.4f
119+
private const val WIDTH_DIVISOR = 16f
120120
private const val VALUE_100 = 100
121121
private const val MINIMUM_WIDTH = 50
122122
private val Int.dp: Int

app/src/main/res/layout/item_custom_incoming_voice_message.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<com.google.android.flexbox.FlexboxLayout
4848
android:id="@id/bubble"
4949
android:layout_width="match_parent"
50-
android:layout_height="match_parent"
50+
android:layout_height="wrap_content"
5151
android:orientation="vertical"
5252
app:alignContent="stretch"
5353
app:alignItems="stretch"
@@ -75,8 +75,8 @@
7575
<com.google.android.material.button.MaterialButton
7676
android:id="@+id/playPauseBtn"
7777
style="@style/Widget.AppTheme.Button.IconButton"
78-
android:layout_width="48dp"
79-
android:layout_height="48dp"
78+
android:layout_width="@dimen/min_size_clickable_area"
79+
android:layout_height="@dimen/min_size_clickable_area"
8080
android:contentDescription="@string/play_pause_voice_message"
8181
android:visibility="visible"
8282
app:cornerRadius="@dimen/button_corner_radius"
@@ -89,19 +89,23 @@
8989
android:layout_width="0dp"
9090
android:layout_height="70dp"
9191
android:layout_weight="1"
92+
android:paddingStart="@dimen/standard_half_padding"
93+
android:paddingTop="@dimen/zero"
94+
android:paddingEnd="@dimen/standard_half_padding"
95+
android:paddingBottom="@dimen/zero"
9296
android:thumb="@drawable/voice_message_outgoing_seek_bar_slider"
93-
tools:progress="50" />
97+
tools:progress="0" />
9498

9599
<com.nextcloud.talk.ui.PlaybackSpeedControl
96100
android:id="@+id/playbackSpeedControlBtn"
97101
style="@style/Widget.AppTheme.Button.IconButton"
98102
android:layout_width="wrap_content"
99-
android:layout_height="48dp"
100-
android:layout_marginEnd="@dimen/standard_margin"
103+
android:layout_height="@dimen/min_size_clickable_area"
101104
android:contentDescription="@string/playback_speed_control"
102105
android:textColor="@color/black"
103106
app:cornerRadius="@dimen/button_corner_radius"
104-
app:rippleColor="#1FFFFFFF" />
107+
app:rippleColor="#1FFFFFFF"
108+
tools:text="1,5x" />
105109

106110
</LinearLayout>
107111

app/src/main/res/layout/item_custom_outcoming_voice_message.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
xmlns:tools="http://schemas.android.com/tools"
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
16-
android:layout_marginStart="@dimen/standard_margin"
16+
android:layout_marginStart="@dimen/zero"
1717
android:layout_marginTop="2dp"
1818
android:layout_marginEnd="@dimen/standard_margin"
1919
android:layout_marginBottom="2dp">
2020

2121
<RelativeLayout
2222
android:layout_width="match_parent"
23-
android:layout_height="match_parent"
23+
android:layout_height="wrap_content"
2424
android:layout_alignParentEnd="true"
2525
android:layout_marginStart="@dimen/message_outcoming_bubble_margin_left">
2626

2727
<com.google.android.flexbox.FlexboxLayout
2828
android:id="@id/bubble"
2929
android:layout_width="match_parent"
30-
android:layout_height="match_parent"
30+
android:layout_height="wrap_content"
3131
app:alignContent="stretch"
3232
app:alignItems="stretch"
3333
app:flexWrap="wrap"
@@ -66,14 +66,17 @@
6666
app:iconTint="@color/high_emphasis_text"
6767
app:rippleColor="#1FFFFFFF" />
6868

69-
7069
<com.nextcloud.talk.ui.WaveformSeekBar
7170
android:id="@+id/seekbar"
7271
android:layout_width="0dp"
73-
android:layout_height="70dp"
72+
android:layout_height="@dimen/min_size_clickable_area"
7473
android:layout_weight="1"
74+
android:paddingStart="@dimen/standard_half_padding"
75+
android:paddingTop="@dimen/zero"
76+
android:paddingEnd="@dimen/standard_half_padding"
77+
android:paddingBottom="@dimen/zero"
7578
android:thumb="@drawable/voice_message_outgoing_seek_bar_slider"
76-
tools:progress="50" />
79+
tools:progress="0" />
7780

7881
<com.nextcloud.talk.ui.PlaybackSpeedControl
7982
android:id="@+id/playbackSpeedControlBtn"
@@ -83,7 +86,8 @@
8386
android:contentDescription="@string/playback_speed_control"
8487
android:textColor="@color/black"
8588
app:cornerRadius="@dimen/button_corner_radius"
86-
app:rippleColor="#1FFFFFFF" />
89+
app:rippleColor="#1FFFFFFF"
90+
tools:text="1,5x" />
8791

8892
</LinearLayout>
8993

0 commit comments

Comments
 (0)