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

@ -38,46 +38,54 @@ public class ChatBubbleViewHolder {
public TextView eventMessage; public TextView eventMessage;
public RelativeLayout bubbleLayout; public RelativeLayout bubbleLayout;
public CheckBox delete;
public LinearLayout background; public LinearLayout background;
public ImageView contactPicture; public ImageView contactPicture;
public ImageView contactPictureMask;
public TextView contactName; public TextView contactName;
public TextView messageText;
public ImageView messageImage;
public RelativeLayout fileTransferLayout;
public ProgressBar fileTransferProgressBar;
public Button fileTransferAction;
public ImageView messageStatus; public ImageView messageStatus;
public ProgressBar messageSendingInProgress; public ProgressBar messageSendingInProgress;
public ImageView contactPictureMask;
public LinearLayout imdmLayout; public LinearLayout imdmLayout;
public ImageView imdmIcon; public ImageView imdmIcon;
public TextView imdmLabel; public TextView imdmLabel;
public TextView messageText;
public ImageView messageImage;
public RelativeLayout fileTransferLayout;
public ProgressBar fileTransferProgressBar;
public Button fileTransferAction;
public TextView fileExtensionLabel; public TextView fileExtensionLabel;
public TextView fileNameLabel; public TextView fileNameLabel;
public CheckBox delete;
public ChatBubbleViewHolder(View view) { public ChatBubbleViewHolder(View view) {
eventLayout = view.findViewById(R.id.event); eventLayout = view.findViewById(R.id.event);
eventTime = view.findViewById(R.id.event_date); eventTime = view.findViewById(R.id.event_date);
eventMessage = view.findViewById(R.id.event_text); eventMessage = view.findViewById(R.id.event_text);
bubbleLayout = view.findViewById(R.id.bubble); bubbleLayout = view.findViewById(R.id.bubble);
delete = view.findViewById(R.id.delete_message);
background = view.findViewById(R.id.background); background = view.findViewById(R.id.background);
contactPicture = view.findViewById(R.id.contact_picture); contactPicture = view.findViewById(R.id.contact_picture);
contactPictureMask = view.findViewById(R.id.mask);
contactName = view.findViewById(R.id.contact_header); 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); messageStatus = view.findViewById(R.id.status);
messageSendingInProgress = view.findViewById(R.id.inprogress); messageSendingInProgress = view.findViewById(R.id.inprogress);
contactPictureMask = view.findViewById(R.id.mask);
imdmLayout = view.findViewById(R.id.imdmLayout); imdmLayout = view.findViewById(R.id.imdmLayout);
imdmIcon = view.findViewById(R.id.imdmIcon); imdmIcon = view.findViewById(R.id.imdmIcon);
imdmLabel = view.findViewById(R.id.imdmText); 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); fileExtensionLabel = view.findViewById(R.id.file_extension);
fileNameLabel = view.findViewById(R.id.file_name); 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); holder.bubbleLayout.setLayoutParams(layoutParams);
} else { } else {
holder.eventLayout.setVisibility(View.VISIBLE); holder.eventLayout.setVisibility(View.VISIBLE);
//TODO
holder.eventMessage.setText(""); //TODO
holder.eventTime.setText(timestampToHumanDate(mContext, event.getTime()));
} }
return view; return view;