Started event layout

This commit is contained in:
Sylvain Berfini 2017-10-25 10:48:00 +02:00
parent 59a522a421
commit 621c8e1af7
2 changed files with 56 additions and 46 deletions

View file

@ -31,53 +31,61 @@ import android.widget.TextView;
import org.linphone.R;
public class ChatBubbleViewHolder {
public String messageId;
public String messageId;
public LinearLayout eventLayout;
public TextView eventTime;
public TextView eventMessage;
public LinearLayout eventLayout;
public TextView eventTime;
public TextView eventMessage;
public RelativeLayout bubbleLayout;
public CheckBox delete;
public LinearLayout background;
public ImageView contactPicture;
public TextView contactName;
public TextView messageText;
public ImageView messageImage;
public RelativeLayout fileTransferLayout;
public ProgressBar fileTransferProgressBar;
public Button fileTransferAction;
public ImageView messageStatus;
public ProgressBar messageSendingInProgress;
public ImageView contactPictureMask;
public LinearLayout imdmLayout;
public ImageView imdmIcon;
public TextView imdmLabel;
public TextView fileExtensionLabel;
public TextView fileNameLabel;
public RelativeLayout bubbleLayout;
public LinearLayout background;
public ImageView contactPicture;
public ImageView contactPictureMask;
public TextView contactName;
public ChatBubbleViewHolder(View view) {
eventLayout = view.findViewById(R.id.event);
eventTime = view.findViewById(R.id.event_date);
eventMessage = view.findViewById(R.id.event_text);
public ImageView messageStatus;
public ProgressBar messageSendingInProgress;
public LinearLayout imdmLayout;
public ImageView imdmIcon;
public TextView imdmLabel;
bubbleLayout = view.findViewById(R.id.bubble);
delete = view.findViewById(R.id.delete_message);
background = view.findViewById(R.id.background);
contactPicture = view.findViewById(R.id.contact_picture);
contactName = view.findViewById(R.id.contact_header);
messageText = view.findViewById(R.id.message);
messageImage = view.findViewById(R.id.image);
fileTransferLayout = view.findViewById(R.id.file_transfer_layout);
fileTransferProgressBar = view.findViewById(R.id.progress_bar);
fileTransferAction = view.findViewById(R.id.file_transfer_action);
messageStatus = view.findViewById(R.id.status);
messageSendingInProgress = view.findViewById(R.id.inprogress);
contactPictureMask = view.findViewById(R.id.mask);
imdmLayout = view.findViewById(R.id.imdmLayout);
imdmIcon = view.findViewById(R.id.imdmIcon);
imdmLabel = view.findViewById(R.id.imdmText);
fileExtensionLabel = view.findViewById(R.id.file_extension);
fileNameLabel = view.findViewById(R.id.file_name);
}
public TextView messageText;
public ImageView messageImage;
public RelativeLayout fileTransferLayout;
public ProgressBar fileTransferProgressBar;
public Button fileTransferAction;
public TextView fileExtensionLabel;
public TextView fileNameLabel;
public CheckBox delete;
public ChatBubbleViewHolder(View view) {
eventLayout = view.findViewById(R.id.event);
eventTime = view.findViewById(R.id.event_date);
eventMessage = view.findViewById(R.id.event_text);
bubbleLayout = view.findViewById(R.id.bubble);
background = view.findViewById(R.id.background);
contactPicture = view.findViewById(R.id.contact_picture);
contactPictureMask = view.findViewById(R.id.mask);
contactName = view.findViewById(R.id.contact_header);
messageStatus = view.findViewById(R.id.status);
messageSendingInProgress = view.findViewById(R.id.inprogress);
imdmLayout = view.findViewById(R.id.imdmLayout);
imdmIcon = view.findViewById(R.id.imdmIcon);
imdmLabel = view.findViewById(R.id.imdmText);
messageText = view.findViewById(R.id.message);
messageImage = view.findViewById(R.id.image);
fileTransferLayout = view.findViewById(R.id.file_transfer_layout);
fileTransferProgressBar = view.findViewById(R.id.progress_bar);
fileTransferAction = view.findViewById(R.id.file_transfer_action);
fileExtensionLabel = view.findViewById(R.id.file_extension);
fileNameLabel = view.findViewById(R.id.file_name);
delete = view.findViewById(R.id.delete_message);
}
}

View file

@ -220,7 +220,9 @@ public class ChatEventsAdapter extends BaseAdapter {
holder.bubbleLayout.setLayoutParams(layoutParams);
} else {
holder.eventLayout.setVisibility(View.VISIBLE);
//TODO
holder.eventMessage.setText(""); //TODO
holder.eventTime.setText(timestampToHumanDate(mContext, event.getTime()));
}
return view;