Show contact names under avatars before sending introduction

to make it clearer who will be introduced.
This commit is contained in:
Torsten Grote
2016-07-08 12:39:26 -03:00
parent 3a3d717884
commit 412bf162ce
2 changed files with 70 additions and 30 deletions

View File

@@ -149,6 +149,10 @@ public class IntroductionMessageFragment extends BaseFragment {
ui.avatar2.setImageDrawable(new IdenticonDrawable(
c2.getAuthor().getId().getBytes()));
// set contact names
ui.contactName1.setText(c1.getAuthor().getName());
ui.contactName2.setText(c2.getAuthor().getName());
// set introduction text
ui.text.setText(String.format(
getString(R.string.introduction_message_text),
@@ -215,6 +219,7 @@ public class IntroductionMessageFragment extends BaseFragment {
private final ProgressBar progressBar;
private final CircleImageView avatar1, avatar2;
private final TextView contactName1, contactName2;
private final TextView text;
private final EditText message;
private final Button button;
@@ -223,6 +228,8 @@ public class IntroductionMessageFragment extends BaseFragment {
progressBar = (ProgressBar) v.findViewById(R.id.progressBar);
avatar1 = (CircleImageView) v.findViewById(R.id.avatarContact1);
avatar2 = (CircleImageView) v.findViewById(R.id.avatarContact2);
contactName1 = (TextView) v.findViewById(R.id.nameContact1);
contactName2 = (TextView) v.findViewById(R.id.nameContact2);
text = (TextView) v.findViewById(R.id.introductionText);
message = (EditText) v.findViewById(R.id.introductionMessageView);
button = (Button) v.findViewById(R.id.makeIntroductionButton);