|
6 | 6 | import android.os.Bundle;
|
7 | 7 | import android.view.View;
|
8 | 8 | import android.widget.Button;
|
| 9 | +import android.widget.ImageView; |
9 | 10 | import android.widget.ProgressBar;
|
10 | 11 | import android.widget.TextView;
|
11 | 12 |
|
|
17 | 18 |
|
18 | 19 | import javax.inject.Inject;
|
19 | 20 |
|
| 21 | +import androidx.appcompat.app.AlertDialog; |
20 | 22 | import androidx.appcompat.widget.Toolbar;
|
21 | 23 | import androidx.drawerlayout.widget.DrawerLayout;
|
22 | 24 | import butterknife.BindView;
|
23 | 25 | import butterknife.ButterKnife;
|
| 26 | +import butterknife.OnClick; |
24 | 27 | import fr.free.nrw.commons.Media;
|
25 | 28 | import fr.free.nrw.commons.R;
|
26 | 29 | import fr.free.nrw.commons.Utils;
|
| 30 | +import fr.free.nrw.commons.achievements.AchievementsActivity; |
27 | 31 | import fr.free.nrw.commons.auth.AuthenticatedActivity;
|
28 | 32 | import fr.free.nrw.commons.delete.DeleteHelper;
|
29 | 33 | import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
| 34 | +import fr.free.nrw.commons.utils.DialogUtil; |
30 | 35 | import fr.free.nrw.commons.utils.MediaDataExtractorUtil;
|
31 | 36 | import fr.free.nrw.commons.utils.ViewUtil;
|
32 | 37 | import io.reactivex.android.schedulers.AndroidSchedulers;
|
@@ -55,10 +60,12 @@ public class ReviewActivity extends AuthenticatedActivity {
|
55 | 60 | ProgressBar progressBar;
|
56 | 61 | @BindView(R.id.imageCaption)
|
57 | 62 | TextView imageCaption;
|
58 |
| - |
| 63 | + @BindView(R.id.skip_image_info) |
| 64 | + ImageView skipImageInfo; |
| 65 | + @BindView(R.id.review_image_info) |
| 66 | + ImageView reviewImageInfo; |
59 | 67 | public ReviewPagerAdapter reviewPagerAdapter;
|
60 | 68 | public ReviewController reviewController;
|
61 |
| - |
62 | 69 | @Inject
|
63 | 70 | MediaWikiApi mwApi;
|
64 | 71 | @Inject
|
@@ -107,6 +114,8 @@ protected void onCreate(Bundle savedInstanceState) {
|
107 | 114 | runRandomizer(); //Run randomizer whenever everything is ready so that a first random image will be added
|
108 | 115 |
|
109 | 116 | skip_image_button.setOnClickListener(view -> runRandomizer());
|
| 117 | + skipImageInfo.setOnClickListener(view -> showSkipImageInfo()); |
| 118 | + reviewImageInfo.setOnClickListener(view -> showReviewImageInfo()); |
110 | 119 | }
|
111 | 120 |
|
112 | 121 | @SuppressLint("CheckResult")
|
@@ -168,4 +177,24 @@ public void swipeToNext() {
|
168 | 177 | runRandomizer();
|
169 | 178 | }
|
170 | 179 | }
|
| 180 | + |
| 181 | + public void showSkipImageInfo(){ |
| 182 | + DialogUtil.showAlertDialog(ReviewActivity.this, |
| 183 | + getString(R.string.skip_image), |
| 184 | + getString(R.string.skip_image_explanation), |
| 185 | + getString(android.R.string.ok), |
| 186 | + "", |
| 187 | + null, |
| 188 | + null); |
| 189 | + } |
| 190 | + |
| 191 | + public void showReviewImageInfo() { |
| 192 | + DialogUtil.showAlertDialog(ReviewActivity.this, |
| 193 | + getString(R.string.title_activity_review), |
| 194 | + getString(R.string.review_image_explanation), |
| 195 | + getString(android.R.string.ok), |
| 196 | + "", |
| 197 | + null, |
| 198 | + null); |
| 199 | + } |
171 | 200 | }
|
0 commit comments