Fix crash while swiping tabs at search activity

This commit is contained in:
Alexey Kulish 2016-07-07 10:47:50 +03:00
parent 0715a0f4c5
commit 52b40ea37b

View file

@ -208,13 +208,13 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
int newFormat = currentFormat;
String itm = (String) format.getItemAtPosition(position);
if (PointDescription.formatToHumanString(v.getContext(), PointDescription.FORMAT_DEGREES).equals(itm)) {
if (PointDescription.formatToHumanString(NavigatePointFragment.this.getContext(), PointDescription.FORMAT_DEGREES).equals(itm)) {
newFormat = PointDescription.FORMAT_DEGREES;
} else if (PointDescription.formatToHumanString(v.getContext(), PointDescription.FORMAT_MINUTES).equals(itm)) {
} else if (PointDescription.formatToHumanString(NavigatePointFragment.this.getContext(), PointDescription.FORMAT_MINUTES).equals(itm)) {
newFormat = PointDescription.FORMAT_MINUTES;
} else if (PointDescription.formatToHumanString(v.getContext(), PointDescription.FORMAT_SECONDS).equals(itm)) {
} else if (PointDescription.formatToHumanString(NavigatePointFragment.this.getContext(), PointDescription.FORMAT_SECONDS).equals(itm)) {
newFormat = PointDescription.FORMAT_SECONDS;
} else if (PointDescription.formatToHumanString(v.getContext(), PointDescription.UTM_FORMAT).equals(itm)) {
} else if (PointDescription.formatToHumanString(NavigatePointFragment.this.getContext(), PointDescription.UTM_FORMAT).equals(itm)) {
newFormat = PointDescription.UTM_FORMAT;
}
try {