mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
feedback: add info about where the feedback gets posted (#5748)
* feedback: add info about where the feedback gets posted Fixes #5747 * feedback: avoid underscore in the link's alternative text * wording --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
22dd69cabb
commit
bb4cfe421a
3 changed files with 19 additions and 0 deletions
|
|
@ -3,6 +3,9 @@ package fr.free.nrw.commons.feedback;
|
|||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -21,15 +24,20 @@ public class FeedbackDialog extends Dialog {
|
|||
|
||||
private OnFeedbackSubmitCallback onFeedbackSubmitCallback;
|
||||
|
||||
private Spanned feedbackDestinationHtml;
|
||||
|
||||
public FeedbackDialog(Context context, OnFeedbackSubmitCallback onFeedbackSubmitCallback) {
|
||||
super(context);
|
||||
this.onFeedbackSubmitCallback = onFeedbackSubmitCallback;
|
||||
feedbackDestinationHtml = Html.fromHtml(context.getString(R.string.feedback_destination_note));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
dialogFeedbackBinding = DialogFeedbackBinding.inflate(getLayoutInflater());
|
||||
dialogFeedbackBinding.feedbackDestination.setText(feedbackDestinationHtml);
|
||||
dialogFeedbackBinding.feedbackDestination.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
Objects.requireNonNull(getWindow()).setSoftInputMode(LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
final View view = dialogFeedbackBinding.getRoot();
|
||||
setContentView(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue