Skip to content

Commit bb4cfe4

Browse files
feedback: add info about where the feedback gets posted (commons-app#5748)
* feedback: add info about where the feedback gets posted Fixes commons-app#5747 * feedback: avoid underscore in the link's alternative text * wording --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
1 parent 22dd69c commit bb4cfe4

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

app/src/main/java/fr/free/nrw/commons/feedback/FeedbackDialog.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import android.app.Dialog;
44
import android.content.Context;
55
import android.os.Bundle;
6+
import android.text.Html;
7+
import android.text.Spanned;
8+
import android.text.method.LinkMovementMethod;
69
import android.view.View;
710
import android.view.WindowManager.LayoutParams;
811
import fr.free.nrw.commons.R;
@@ -21,15 +24,20 @@ public class FeedbackDialog extends Dialog {
2124

2225
private OnFeedbackSubmitCallback onFeedbackSubmitCallback;
2326

27+
private Spanned feedbackDestinationHtml;
28+
2429
public FeedbackDialog(Context context, OnFeedbackSubmitCallback onFeedbackSubmitCallback) {
2530
super(context);
2631
this.onFeedbackSubmitCallback = onFeedbackSubmitCallback;
32+
feedbackDestinationHtml = Html.fromHtml(context.getString(R.string.feedback_destination_note));
2733
}
2834

2935
@Override
3036
protected void onCreate(final Bundle savedInstanceState) {
3137
super.onCreate(savedInstanceState);
3238
dialogFeedbackBinding = DialogFeedbackBinding.inflate(getLayoutInflater());
39+
dialogFeedbackBinding.feedbackDestination.setText(feedbackDestinationHtml);
40+
dialogFeedbackBinding.feedbackDestination.setMovementMethod(LinkMovementMethod.getInstance());
3341
Objects.requireNonNull(getWindow()).setSoftInputMode(LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
3442
final View view = dialogFeedbackBinding.getRoot();
3543
setContentView(view);

app/src/main/res/layout/dialog_feedback.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@
122122
android:layout_margin="@dimen/dimen_6"
123123
/>
124124

125+
<TextView
126+
android:id="@+id/feedback_destination"
127+
android:layout_margin="@dimen/dimen_6"
128+
android:padding="4dp"
129+
android:textSize="14sp"
130+
android:textColor="?android:attr/textColorPrimary"
131+
android:text="@string/feedback_destination_note"
132+
android:layout_width="wrap_content"
133+
android:layout_height="wrap_content" />
134+
125135
<Button
126136
android:id="@+id/btn_submit_feedback"
127137
android:textColor="@color/white"

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,4 +818,5 @@ Upload your first media by tapping on the add button.</string>
818818
</plurals>
819819
<string name="multiple_files_depiction">Please remember that all images in a multi-upload get the same categories and depictions. If the images do not share depictions and categories, please perform several separate uploads.</string>
820820
<string name="multiple_files_depiction_header">Note about multi-uploads</string>
821+
<string name="feedback_destination_note">Your feedback gets posted to the following wiki page: <![CDATA[ <a href="https://commons.wikimedia.org/wiki/Commons:Mobile_app/Feedback">Commons:Mobile app/Feedback</a> ]]></string>
821822
</resources>

0 commit comments

Comments
 (0)