mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add information icons to explan peer review activity (#2783)
This commit is contained in:
parent
3876e1c52f
commit
874e761691
3 changed files with 70 additions and 9 deletions
|
|
@ -6,6 +6,7 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
|
@ -17,16 +18,20 @@ import java.util.ArrayList;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import fr.free.nrw.commons.Media;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.achievements.AchievementsActivity;
|
||||
import fr.free.nrw.commons.auth.AuthenticatedActivity;
|
||||
import fr.free.nrw.commons.delete.DeleteHelper;
|
||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||
import fr.free.nrw.commons.utils.DialogUtil;
|
||||
import fr.free.nrw.commons.utils.MediaDataExtractorUtil;
|
||||
import fr.free.nrw.commons.utils.ViewUtil;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
|
|
@ -55,10 +60,12 @@ public class ReviewActivity extends AuthenticatedActivity {
|
|||
ProgressBar progressBar;
|
||||
@BindView(R.id.imageCaption)
|
||||
TextView imageCaption;
|
||||
|
||||
@BindView(R.id.skip_image_info)
|
||||
ImageView skipImageInfo;
|
||||
@BindView(R.id.review_image_info)
|
||||
ImageView reviewImageInfo;
|
||||
public ReviewPagerAdapter reviewPagerAdapter;
|
||||
public ReviewController reviewController;
|
||||
|
||||
@Inject
|
||||
MediaWikiApi mwApi;
|
||||
@Inject
|
||||
|
|
@ -107,6 +114,8 @@ public class ReviewActivity extends AuthenticatedActivity {
|
|||
runRandomizer(); //Run randomizer whenever everything is ready so that a first random image will be added
|
||||
|
||||
skip_image_button.setOnClickListener(view -> runRandomizer());
|
||||
skipImageInfo.setOnClickListener(view -> showSkipImageInfo());
|
||||
reviewImageInfo.setOnClickListener(view -> showReviewImageInfo());
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
|
|
@ -168,4 +177,24 @@ public class ReviewActivity extends AuthenticatedActivity {
|
|||
runRandomizer();
|
||||
}
|
||||
}
|
||||
|
||||
public void showSkipImageInfo(){
|
||||
DialogUtil.showAlertDialog(ReviewActivity.this,
|
||||
getString(R.string.skip_image),
|
||||
getString(R.string.skip_image_explanation),
|
||||
getString(android.R.string.ok),
|
||||
"",
|
||||
null,
|
||||
null);
|
||||
}
|
||||
|
||||
public void showReviewImageInfo() {
|
||||
DialogUtil.showAlertDialog(ReviewActivity.this,
|
||||
getString(R.string.title_activity_review),
|
||||
getString(R.string.review_image_explanation),
|
||||
getString(android.R.string.ok),
|
||||
"",
|
||||
null,
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
@ -15,19 +16,48 @@
|
|||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip_image"
|
||||
<ImageView
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:id="@+id/review_image_info"
|
||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||
android:tint="@color/white"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="20dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/skip_image_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:text="@string/skip_image"
|
||||
android:textColor="@color/button_blue_dark"
|
||||
android:textStyle="bold" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip_image"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="@string/skip_image"
|
||||
android:textColor="@color/button_blue_dark"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginLeft="120dp"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:id="@+id/skip_image_info"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_gravity="top"
|
||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||
android:tint="@color/button_blue_dark" />
|
||||
|
||||
</LinearLayout>
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/skip_image"
|
||||
android:layout_below="@+id/skip_image_row"
|
||||
android:layout_above="@+id/reviewPagerIndicator"
|
||||
>
|
||||
|
||||
|
|
|
|||
|
|
@ -508,6 +508,8 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="review_copyright_no_button_text">SEEMS FINE</string>
|
||||
<string name="review_thanks_yes_button_text">YES, WHY NOT</string>
|
||||
<string name="review_thanks_no_button_text">NEXT IMAGE</string>
|
||||
<string name="skip_image_explanation">Clicking this button will give you another recently uploaded image from Wikimedia Commons</string>
|
||||
<string name="review_image_explanation">You can review images and improve the quality of Wikimedia Commoms.\n The four parameters of review are: \n - Is this image in-scope? \n - Does this image follow the rules of copyright? \n - Is this image correctly categorized? \n - If all goes well you can also thank the contributor.</string>
|
||||
|
||||
<plurals name="receiving_shared_content">
|
||||
<item quantity="one">Receiving shared content. Processing the image might take some time depending on the size of the image and your device</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue