@Override
protected void publishResults(CharSequence charSequence, FilterResults filterResults) {
if (filterResults.count == 0){
subItems.clear();
Toast.makeText(context,"нет совпадений",Toast.LENGTH_SHORT).show
notifyDataSetChanged();
}
subItems = (ArrayList) filterResults.values;
notifyDataSetChanged();
}
String patt = "^[1-9]\\d*?(\\.\\d{1,2})?$";
String str[] = new String[] { "12.13", "1.12", "234234", "0213", "-234.23", "0.12", "23-.23", "23f" };
for (String string : str)
{
System.out.println(string + " - " + string.matches(patt));
}
private ArrayList<...> arrayList;
@Override
protected void onCreate(Bundle savedInstanceState)
{
onResponse()
{
ArrayList = ...;
applyInfo();
}
queue.add(jsObjRequest);
showProgressBar();
}
void applyInfo(ArrayList<...> arrayList)
{
MyGridViewAdapter adapter = new MyGridViewAdapter(this, arrayList);
mGridView.setAdapter(adapter);
}
void showProgressBar()
{
mProgressBar.setVisibility(View.VISIBLE);
}
void hideProgressBar()
{
mProgressBar.setVisibility(View.VISIBLE);
}