mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Merge remote-tracking branch 'upstream/master' into addThemeToggle
This commit is contained in:
commit
1df98efb27
63 changed files with 203 additions and 13 deletions
|
|
@ -8,6 +8,9 @@ import android.location.LocationManager;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import fr.free.nrw.commons.BaseAppCompatActivity;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -40,12 +43,33 @@ public class NearbyActivity extends BaseAppCompatActivity {
|
|||
ft.add(R.id.container, fragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu (Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.menu_nearby, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_refresh:
|
||||
refreshView();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onResume(){
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
protected void refreshView()
|
||||
{
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyListFragment()).commit();
|
||||
}
|
||||
protected LatLng getmLatestLocation() {
|
||||
return mLatestLocation;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue