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:
Kaartic Sivaraam 2024-06-10 00:38:38 +05:30 committed by GitHub
parent 22dd69cabb
commit bb4cfe421a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -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);