mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 15:23:54 +01:00
Added showSnackbar in ViewUtil and shown in NearbyActivity
This commit is contained in:
parent
2516445d68
commit
9f621539c7
2 changed files with 16 additions and 3 deletions
|
|
@ -274,7 +274,8 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
LatLng lastLocation = locationManager.getLastLocation();
|
||||
if (curLatLang != null && curLatLang.equals(lastLocation)) { //refresh view only if location has changed
|
||||
if (isHardRefresh) {
|
||||
ViewUtil.showLongToast(this, R.string.nearby_location_has_not_changed);
|
||||
// ViewUtil.showLongToast(this, R.string.nearby_location_has_not_changed);
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.nearby_location_has_not_changed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -302,8 +303,9 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
|
||||
if (placeList.size() == 0) {
|
||||
int duration = Toast.LENGTH_SHORT;
|
||||
Toast toast = Toast.makeText(this, R.string.no_nearby, duration);
|
||||
toast.show();
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.no_nearby);
|
||||
// Toast toast = Toast.makeText(this, R.string.no_nearby, duration);
|
||||
// toast.show();
|
||||
}
|
||||
|
||||
bundle.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue