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