Fix #2964
This commit is contained in:
parent
24dfe51bf8
commit
de35609326
1 changed files with 51 additions and 45 deletions
|
@ -1,14 +1,42 @@
|
||||||
package net.osmand.plus.search;
|
package net.osmand.plus.search;
|
||||||
|
|
||||||
import java.io.File;
|
import android.annotation.SuppressLint;
|
||||||
import java.io.IOException;
|
import android.app.Dialog;
|
||||||
import java.util.ArrayList;
|
import android.content.DialogInterface;
|
||||||
import java.util.List;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.design.widget.TabLayout;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.app.FragmentManager;
|
||||||
|
import android.support.v4.app.FragmentPagerAdapter;
|
||||||
|
import android.support.v4.app.FragmentTransaction;
|
||||||
|
import android.support.v4.content.FileProvider;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnClickListener;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.ResultMatcher;
|
import net.osmand.ResultMatcher;
|
||||||
import net.osmand.data.City;
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.osm.AbstractPoiType;
|
import net.osmand.osm.AbstractPoiType;
|
||||||
|
@ -43,39 +71,11 @@ import net.osmand.search.core.SearchSettings;
|
||||||
import net.osmand.search.core.SearchWord;
|
import net.osmand.search.core.SearchWord;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Dialog;
|
import java.io.File;
|
||||||
import android.content.DialogInterface;
|
import java.io.IOException;
|
||||||
import android.content.Intent;
|
import java.util.ArrayList;
|
||||||
import android.content.res.Resources;
|
import java.util.List;
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.annotation.Nullable;
|
|
||||||
import android.support.design.widget.TabLayout;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.support.v4.app.FragmentManager;
|
|
||||||
import android.support.v4.app.FragmentPagerAdapter;
|
|
||||||
import android.support.v4.app.FragmentTransaction;
|
|
||||||
import android.support.v4.content.FileProvider;
|
|
||||||
import android.support.v4.view.ViewPager;
|
|
||||||
import android.support.v7.app.AlertDialog;
|
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.ListView;
|
|
||||||
import android.widget.ProgressBar;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
public class QuickSearchDialogFragment extends DialogFragment implements OsmAndCompassListener, OsmAndLocationListener {
|
public class QuickSearchDialogFragment extends DialogFragment implements OsmAndCompassListener, OsmAndLocationListener {
|
||||||
|
|
||||||
|
@ -752,11 +752,13 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(AppInitializer init) {
|
public void onFinish(AppInitializer init) {
|
||||||
|
if (!paused) {
|
||||||
reloadCategoriesInternal();
|
reloadCategoriesInternal();
|
||||||
if (!searching) {
|
if (!searching) {
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reloadCategoriesInternal();
|
reloadCategoriesInternal();
|
||||||
|
@ -791,11 +793,13 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(AppInitializer init) {
|
public void onFinish(AppInitializer init) {
|
||||||
|
if (!paused) {
|
||||||
reloadHistoryInternal();
|
reloadHistoryInternal();
|
||||||
if (!searching) {
|
if (!searching) {
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
reloadHistoryInternal();
|
reloadHistoryInternal();
|
||||||
|
@ -848,8 +852,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish(AppInitializer init) {
|
public void onFinish(AppInitializer init) {
|
||||||
|
if (!paused) {
|
||||||
runCoreSearchInternal(text, updateResult, searchMore);
|
runCoreSearchInternal(text, updateResult, searchMore);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
runCoreSearchInternal(text, updateResult, searchMore);
|
runCoreSearchInternal(text, updateResult, searchMore);
|
||||||
|
|
Loading…
Reference in a new issue