Add NearbyActivity

This commit is contained in:
misaochan 2016-08-22 17:29:45 +12:00
parent 9f93b87a63
commit 9e13d644c5
3 changed files with 31 additions and 2 deletions

View file

@ -30,6 +30,7 @@ import fr.free.nrw.commons.AboutActivity;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.SettingsActivity;
import fr.free.nrw.commons.nearby.NearbyActivity;
import fr.free.nrw.commons.upload.UploadService;
public class ContributionsListFragment extends Fragment {
@ -142,15 +143,16 @@ public class ContributionsListFragment extends Fragment {
feedbackIntent.setType("message/rfc822");
feedbackIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { CommonsApplication.FEEDBACK_EMAIL });
feedbackIntent.putExtra(Intent.EXTRA_SUBJECT, String.format(CommonsApplication.FEEDBACK_EMAIL_SUBJECT, CommonsApplication.APPLICATION_VERSION));
try {
startActivity(feedbackIntent);
}
catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();
}
return true;
case R.id.menu_nearby:
Intent nearbyIntent = new Intent(getActivity(), NearbyActivity.class);
startActivity(nearbyIntent);
case R.id.menu_refresh:
((SourceRefresher)getActivity()).refreshSource();
return true;

View file

@ -0,0 +1,15 @@
package fr.free.nrw.commons.nearby;
import android.app.Activity;
import android.os.Bundle;
import fr.free.nrw.commons.R;
public class NearbyActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_nearby);
}
}