From 566b5b0181580b6fee7a91c5ea6cf5b41e1c3c57 Mon Sep 17 00:00:00 2001 From: Christian S Date: Thu, 5 May 2016 18:44:32 +0200 Subject: bug fix in audioplayer --- src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 1543e4051..36c6d3acf 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -473,11 +473,12 @@ public class MessageAdapter extends ArrayAdapter { Uri audioFile = Uri.fromFile(activity.xmppConnectionService.getFileBackend().getFile(message)); AudioWife audioWife = audioPlayer.get(position); + RelativeLayout vg = new RelativeLayout(activity); if (audioWife == null) { audioWife = new AudioWife(); audioWife.init(getContext(), audioFile); audioPlayer.put(position, audioWife); - RelativeLayout vg = new RelativeLayout(activity); + LayoutInflater layoutInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); audioWife.useDefaultUi(vg, layoutInflater); viewHolder.aw_player.addView(audioWife.getPlayerUi()); -- cgit v1.2.3