mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Merge branch '805-introduction-message-layout' into 'master'
Use smaller layout for introduction message screen Closes #805 See merge request !552
This commit is contained in:
@@ -33,7 +33,6 @@ import im.delight.android.identicons.IdenticonDrawable;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.briar.api.introduction.IntroductionConstants.MAX_INTRODUCTION_MESSAGE_LENGTH;
|
||||
@@ -94,7 +93,6 @@ public class IntroductionMessageFragment extends BaseFragment
|
||||
View v = inflater.inflate(R.layout.introduction_message, container,
|
||||
false);
|
||||
ui = new ViewHolder(v);
|
||||
ui.text.setVisibility(GONE);
|
||||
ui.message.setSendButtonEnabled(false);
|
||||
|
||||
return v;
|
||||
@@ -156,17 +154,11 @@ public class IntroductionMessageFragment extends BaseFragment
|
||||
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),
|
||||
c1.getAuthor().getName(), c2.getAuthor().getName()));
|
||||
|
||||
// set button action
|
||||
ui.message.setListener(IntroductionMessageFragment.this);
|
||||
|
||||
// hide progress bar and show views
|
||||
ui.progressBar.setVisibility(GONE);
|
||||
ui.text.setVisibility(VISIBLE);
|
||||
ui.message.setSendButtonEnabled(true);
|
||||
ui.message.showSoftKeyboard();
|
||||
}
|
||||
@@ -234,7 +226,6 @@ 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 TextInputView message;
|
||||
|
||||
private ViewHolder(View v) {
|
||||
@@ -243,7 +234,6 @@ public class IntroductionMessageFragment extends BaseFragment
|
||||
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 = (TextInputView) v
|
||||
.findViewById(R.id.introductionMessageView);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user