Change snackbar strings
This commit is contained in:
parent
6ab23584a0
commit
a1ccfd34da
3 changed files with 7 additions and 2 deletions
|
@ -9,6 +9,8 @@
|
||||||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
|
<string name="marker_moved_to_history">Marker moved to History</string>
|
||||||
|
<string name="marker_moved_to_active">Marker moved to Active</string>
|
||||||
<string name="shared_string_list">List</string>
|
<string name="shared_string_list">List</string>
|
||||||
<string name="shared_string_groups">Groups</string>
|
<string name="shared_string_groups">Groups</string>
|
||||||
<string name="passed">Passed: %1$s</string>
|
<string name="passed">Passed: %1$s</string>
|
||||||
|
|
|
@ -146,13 +146,16 @@ public class MapMarkersHistoryFragment extends Fragment implements MapMarkersHel
|
||||||
Object item = adapter.getItem(pos);
|
Object item = adapter.getItem(pos);
|
||||||
if (item instanceof MapMarker) {
|
if (item instanceof MapMarker) {
|
||||||
final MapMarker marker = (MapMarker) item;
|
final MapMarker marker = (MapMarker) item;
|
||||||
|
int snackbarStringRes;
|
||||||
if (direction == ItemTouchHelper.LEFT) {
|
if (direction == ItemTouchHelper.LEFT) {
|
||||||
app.getMapMarkersHelper().restoreMarkerFromHistory((MapMarker) item, 0);
|
app.getMapMarkersHelper().restoreMarkerFromHistory((MapMarker) item, 0);
|
||||||
|
snackbarStringRes = R.string.marker_moved_to_active;
|
||||||
} else {
|
} else {
|
||||||
app.getMapMarkersHelper().removeMarkerFromHistory((MapMarker) item);
|
app.getMapMarkersHelper().removeMarkerFromHistory((MapMarker) item);
|
||||||
|
snackbarStringRes = R.string.item_removed;
|
||||||
}
|
}
|
||||||
adapter.notifyItemRemoved(pos);
|
adapter.notifyItemRemoved(pos);
|
||||||
snackbar = Snackbar.make(viewHolder.itemView, R.string.item_removed, Snackbar.LENGTH_LONG)
|
snackbar = Snackbar.make(viewHolder.itemView, snackbarStringRes, Snackbar.LENGTH_LONG)
|
||||||
.setAction(R.string.shared_string_undo, new View.OnClickListener() {
|
.setAction(R.string.shared_string_undo, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
||||||
notifyItemChanged(1);
|
notifyItemChanged(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
snackbar = Snackbar.make(holder.itemView, R.string.item_removed, Snackbar.LENGTH_LONG)
|
snackbar = Snackbar.make(holder.itemView, mapActivity.getString(R.string.marker_moved_to_history), Snackbar.LENGTH_LONG)
|
||||||
.setAction(R.string.shared_string_undo, new View.OnClickListener() {
|
.setAction(R.string.shared_string_undo, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
Loading…
Reference in a new issue