Fixed IMDN view display

This commit is contained in:
Sylvain Berfini 2018-11-25 20:40:37 +01:00
parent dc8c5c3e2d
commit 94f792c6e5
3 changed files with 21 additions and 7 deletions

View file

@ -30,6 +30,7 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import org.linphone.LinphoneManager; import org.linphone.LinphoneManager;
import org.linphone.mediastream.Log;
import org.linphone.utils.LinphoneUtils; import org.linphone.utils.LinphoneUtils;
import org.linphone.R; import org.linphone.R;
import org.linphone.LinphoneActivity; import org.linphone.LinphoneActivity;
@ -120,6 +121,18 @@ public class ImdnFragment extends Fragment {
} }
refreshInfo(); refreshInfo();
mMessage.setListener(new ChatMessageListenerStub() {
@Override
public void onParticipantImdnStateChanged(ChatMessage msg, ParticipantImdnState state) {
refreshInfo();
}
});
}
@Override
public void onPause() {
mMessage.setListener(null);
super.onPause();
} }
private void refreshInfo() { private void refreshInfo() {

View file

@ -126,6 +126,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:layout_marginTop="7dp" android:layout_marginTop="7dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="45dp" android:layout_marginLeft="45dp"
android:layout_toLeftOf="@id/imdn"/> android:layout_toLeftOf="@id/imdn"/>

View file

@ -53,13 +53,6 @@
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:layout_below="@id/top"> android:layout_below="@id/top">
<include
android:id="@+id/bubble"
layout="@layout/chat_bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"/>
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -69,6 +62,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<include
android:id="@+id/bubble"
layout="@layout/chat_bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"/>
<LinearLayout <LinearLayout
android:id="@+id/read_layout_header" android:id="@+id/read_layout_header"
android:layout_width="match_parent" android:layout_width="match_parent"