explain read marker
This commit is contained in:
parent
d58fadd05f
commit
6756386eee
|
@ -35,7 +35,6 @@ import eu.siacs.conversations.entities.Message;
|
||||||
import eu.siacs.conversations.entities.Message.ImageParams;
|
import eu.siacs.conversations.entities.Message.ImageParams;
|
||||||
import eu.siacs.conversations.ui.ConversationActivity;
|
import eu.siacs.conversations.ui.ConversationActivity;
|
||||||
import eu.siacs.conversations.utils.UIHelper;
|
import eu.siacs.conversations.utils.UIHelper;
|
||||||
import eu.siacs.conversations.xmpp.jid.Jid;
|
|
||||||
|
|
||||||
public class MessageAdapter extends ArrayAdapter<Message> {
|
public class MessageAdapter extends ArrayAdapter<Message> {
|
||||||
|
|
||||||
|
@ -388,10 +387,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
||||||
.findViewById(R.id.indicator_received);
|
.findViewById(R.id.indicator_received);
|
||||||
break;
|
break;
|
||||||
case STATUS:
|
case STATUS:
|
||||||
view = activity.getLayoutInflater().inflate(
|
view = activity.getLayoutInflater().inflate(R.layout.message_status, parent, false);
|
||||||
R.layout.message_status, parent, false);
|
viewHolder.contact_picture = (ImageView) view.findViewById(R.id.message_photo);
|
||||||
viewHolder.contact_picture = (ImageView) view
|
viewHolder.status_message = (TextView) view.findViewById(R.id.status_message);
|
||||||
.findViewById(R.id.message_photo);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
viewHolder = null;
|
viewHolder = null;
|
||||||
|
@ -411,20 +409,8 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
||||||
.avatarService().get(conversation.getContact(),
|
.avatarService().get(conversation.getContact(),
|
||||||
activity.getPixel(32)));
|
activity.getPixel(32)));
|
||||||
viewHolder.contact_picture.setAlpha(0.5f);
|
viewHolder.contact_picture.setAlpha(0.5f);
|
||||||
viewHolder.contact_picture
|
viewHolder.status_message.setText(
|
||||||
.setOnClickListener(new OnClickListener() {
|
activity.getString(R.string.contact_has_read_up_to_this_point, conversation.getName()));
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
String name = conversation.getName();
|
|
||||||
String read = getContext()
|
|
||||||
.getString(
|
|
||||||
R.string.contact_has_read_up_to_this_point,
|
|
||||||
name);
|
|
||||||
Toast.makeText(getContext(), read,
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
|
@ -577,6 +563,6 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
||||||
protected TextView time;
|
protected TextView time;
|
||||||
protected TextView messageBody;
|
protected TextView messageBody;
|
||||||
protected ImageView contact_picture;
|
protected ImageView contact_picture;
|
||||||
|
protected TextView status_message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,4 +19,17 @@
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/ic_profile" />
|
android:src="@drawable/ic_profile" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/status_message"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_toEndOf="@+id/message_photo"
|
||||||
|
android:layout_toRightOf="@+id/message_photo"
|
||||||
|
android:text="@string/contact_has_read_up_to_this_point"
|
||||||
|
android:textColor="@color/secondarytext"
|
||||||
|
android:textSize="?attr/TextSizeInfo"
|
||||||
|
android:textStyle="italic"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in a new issue