mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Add NearbyActivity
This commit is contained in:
parent
9f93b87a63
commit
9e13d644c5
3 changed files with 31 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue