Added the alertDialog for info button

This commit is contained in:
tanvidadu 2018-06-06 01:36:22 +05:30
parent 0b68fdb6b6
commit 53d274ba3b
2 changed files with 17 additions and 0 deletions

View file

@ -43,6 +43,7 @@ import javax.inject.Inject;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.auth.SessionManager;
@ -135,6 +136,21 @@ public class AchievementsActivity extends NavigationBaseActivity {
initDrawer();
}
/**
* to invoke the AlertDialog on clicking info button
*/
@OnClick(R.id.achievement_info)
public void showInfoDialog(){
new AlertDialog.Builder(AchievementsActivity.this)
.setTitle(R.string.Achievements)
.setMessage(R.string.achievements_info_message)
.setCancelable(true)
.setNeutralButton(android.R.string.ok, (dialog, id) -> dialog.cancel())
.create()
.show();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.

View file

@ -293,4 +293,5 @@
<string name="image_reverts">Images Not Reverted</string>
<string name="images_used_by_wiki">Images Used By Wiki</string>
<string name="achievements_share_message">Proceed to Share the Screenshot of Achievements</string>
<string name="achievements_info_message">The Quality as well as the Quantity of images uploaded makes up the criterion for determining the levels. For Each level there are certain requirements in terms of number of images uploaded, revert rate and images used by Wiki that needs to be met.</string>
</resources>