Fix #151
This commit is contained in:
parent
75538deb9b
commit
a8407571a4
|
@ -92,7 +92,9 @@ public class AudioStatusDisplayItem extends StatusDisplayItem{
|
|||
public void onBind(AudioStatusDisplayItem item){
|
||||
int seconds=(int)item.attachment.getDuration();
|
||||
String duration=formatDuration(seconds);
|
||||
time.getLayoutParams().width=(int)Math.ceil(time.getPaint().measureText("-"+duration));
|
||||
// Some fonts (not Roboto) have different-width digits. 0 is supposedly the widest.
|
||||
time.getLayoutParams().width=(int)Math.ceil(Math.max(time.getPaint().measureText("-"+duration),
|
||||
time.getPaint().measureText("-"+duration.replaceAll("\\d", "0"))));
|
||||
time.setText(duration);
|
||||
AudioPlayerService service=AudioPlayerService.getInstance();
|
||||
if(service!=null && service.getAttachmentID().equals(item.attachment.id)){
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
android:textAppearance="@style/m3_label_medium"
|
||||
android:textColor="?colorButtonText"
|
||||
android:gravity="end"
|
||||
android:singleLine="true"
|
||||
tools:text="1:23"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in New Issue