Search city starting from 3rd char

This commit is contained in:
Alexey Kulish 2016-11-06 18:51:23 +03:00
parent f78bb712f8
commit d97b0a052a

View file

@ -8,7 +8,6 @@ import android.support.v4.content.ContextCompat;
import android.support.v7.view.ContextThemeWrapper;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
@ -532,7 +531,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
results.count = 0;
} else {
List<Object> filter = new ArrayList<>();
if (constraint.length() > 3) {
if (constraint.length() > 2) {
try {
filter.addAll(searchCities(getMyApplication(), constraint.toString()));
} catch (IOException e) {