Multiple Filtering a ListView of objects with a Spinner by a value within the object and with searchview...
up vote
0
down vote
favorite
In my project I have made an object class called Assure
with many values such as one called caissesec
. All the assure
are displayed by a ListView and have a set caissesec
Spinner in the layout (with the purpose of categorizing the assure
s with the matching caissesec
).
i filter with searchview
for the name of assure
how to match 2 filter? for example choice the caissesec
(the type of assure
) in the spinner and choice the name of assure
with searchview exist in the type selected
code for my Adapter:
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
final FilterResults oReturn = new FilterResults();
final ArrayList<Assure> results = new ArrayList<Assure>();
if (orig == null)
orig = (ArrayList<Assure>) mAssureList;
if (constraint != null) {
if (orig != null && orig.size() > 0) {
for (final Assure p : orig) {if((mAssureList.get(i).getNomprenom().toLowerCase().contains(constraint.toString())) || mAssureList.get(i).getNomprenom().toUpperCase().contains(constraint.toString()) ||(p.getCaissesec().contains(constraint.toString())) {results.add(p);
}
}
oReturn.values = results;
}
return oReturn;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
mAssureList = (ArrayList<Assure>) results.values;
notifyDataSetChanged();
}
};
}
public void notifyDataSetChanged() {
// either this or: orig = dataSet;
//orig = null;
super.notifyDataSetChanged();
}
ListAssure.java :
public class listassurecnam extends AppCompatActivity implements SearchView.OnQueryTextListener {
ImageView sback;
SearchView searchAssure;
private ListView lvAssure;
private ListAssureAdapter adapter;
//private List<Patient> mPatientList;
private DatabaseHelper mDBHelper;
private ArrayList<Assure> mAssureList;
//private ArrayList<Assure> orig;
Spinner spinnerCaisse;
String type_caisse = {"TOUS","CNSS","CNRPS"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_assurecnam);
sback = (ImageView)findViewById(R.id.menub);
searchAssure = (SearchView)findViewById(R.id.searchViewAssure);
lvAssure = findViewById(R.id.listViewCnam);
mDBHelper = DatabaseHelper.getInstance(this);
mAssureList=new ArrayList<Assure>();
//orig=new ArrayList<Assure>();
spinnerCaisse = findViewById(R.id.spinnerCaisse);
sback.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
Intent it = new Intent(listassurecnam.this,menu.class);
startActivity(it);
}
});
searchAssure = (SearchView) findViewById(R.id.searchViewAssure);
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setHintTextColor(Color.rgb(170,170,170));
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setTextColor(Color.rgb(225,225,225));
//add header to listview
LayoutInflater inflater = getLayoutInflater();
ViewGroup header = (ViewGroup)inflater.inflate(R.layout.listheadercnam, lvAssure, false);
lvAssure.addHeaderView(header, null, false);
//Get patient list in db when db exists
mAssureList = (ArrayList<Assure>) mDBHelper.getListAssure();
//Init adapter
adapter = new ListAssureAdapter(this, mAssureList);
// Save the ListView state (= includes scroll position) as a Parcelable
Parcelable state = lvAssure.onSaveInstanceState();
//Set adapter for listView
lvAssure.setAdapter(adapter);
//Filter list
lvAssure.setTextFilterEnabled(true);
setupSearchView();
// Restore previous state (including selected item index and scroll position)
lvAssure.onRestoreInstanceState(state);
// Start Activity FichePatient with ClickListener
lvAssure.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
int itemId = (int) adapter.getItemId(position-1);
Assure assure = mAssureList.get(itemId);
String id_cnam = assure.getIdcnam();
String type_caiss = assure.getCaissesec();
//String name_ass = assure.getNameAss();
//String naiss_ass = assure.getDateNaissAss();
Intent intent = new Intent(listassurecnam.this,assurecnam.class);
intent.putExtra("CARN",id_cnam);
intent.putExtra("CARN2",type_caiss);
startActivity(intent);
}
});
final ArrayAdapter <String> spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,type_caisse);
//MainActivity.categories is an array filled with strings
spinnerAdapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
spinnerCaisse.setAdapter(spinnerAdapter);
spinnerCaisse.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long itemID) {
String text = spinnerCaisse.getSelectedItem().toString();
if(text.equals("TOUS"))
adapter.getFilter().filter("");
else {
adapter.getFilter().filter(text);
adapter.notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
private void setupSearchView()
{
searchAssure.setIconifiedByDefault(false);
searchAssure.setOnQueryTextListener(this);
searchAssure.setSubmitButtonEnabled(true);
searchAssure.setQueryHint("Chercher un assuré CNAM");
}
@Override
public boolean onQueryTextChange(String newText)
{
if (TextUtils.isEmpty(newText)) {
lvAssure.clearTextFilter();
adapter.getFilter().filter("");
} else {
lvAssure.setFilterText(newText);
}
return true;
}
@Override
public boolean onQueryTextSubmit(String query)
{
return false;
}
}
java android android-studio
add a comment |
up vote
0
down vote
favorite
In my project I have made an object class called Assure
with many values such as one called caissesec
. All the assure
are displayed by a ListView and have a set caissesec
Spinner in the layout (with the purpose of categorizing the assure
s with the matching caissesec
).
i filter with searchview
for the name of assure
how to match 2 filter? for example choice the caissesec
(the type of assure
) in the spinner and choice the name of assure
with searchview exist in the type selected
code for my Adapter:
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
final FilterResults oReturn = new FilterResults();
final ArrayList<Assure> results = new ArrayList<Assure>();
if (orig == null)
orig = (ArrayList<Assure>) mAssureList;
if (constraint != null) {
if (orig != null && orig.size() > 0) {
for (final Assure p : orig) {if((mAssureList.get(i).getNomprenom().toLowerCase().contains(constraint.toString())) || mAssureList.get(i).getNomprenom().toUpperCase().contains(constraint.toString()) ||(p.getCaissesec().contains(constraint.toString())) {results.add(p);
}
}
oReturn.values = results;
}
return oReturn;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
mAssureList = (ArrayList<Assure>) results.values;
notifyDataSetChanged();
}
};
}
public void notifyDataSetChanged() {
// either this or: orig = dataSet;
//orig = null;
super.notifyDataSetChanged();
}
ListAssure.java :
public class listassurecnam extends AppCompatActivity implements SearchView.OnQueryTextListener {
ImageView sback;
SearchView searchAssure;
private ListView lvAssure;
private ListAssureAdapter adapter;
//private List<Patient> mPatientList;
private DatabaseHelper mDBHelper;
private ArrayList<Assure> mAssureList;
//private ArrayList<Assure> orig;
Spinner spinnerCaisse;
String type_caisse = {"TOUS","CNSS","CNRPS"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_assurecnam);
sback = (ImageView)findViewById(R.id.menub);
searchAssure = (SearchView)findViewById(R.id.searchViewAssure);
lvAssure = findViewById(R.id.listViewCnam);
mDBHelper = DatabaseHelper.getInstance(this);
mAssureList=new ArrayList<Assure>();
//orig=new ArrayList<Assure>();
spinnerCaisse = findViewById(R.id.spinnerCaisse);
sback.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
Intent it = new Intent(listassurecnam.this,menu.class);
startActivity(it);
}
});
searchAssure = (SearchView) findViewById(R.id.searchViewAssure);
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setHintTextColor(Color.rgb(170,170,170));
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setTextColor(Color.rgb(225,225,225));
//add header to listview
LayoutInflater inflater = getLayoutInflater();
ViewGroup header = (ViewGroup)inflater.inflate(R.layout.listheadercnam, lvAssure, false);
lvAssure.addHeaderView(header, null, false);
//Get patient list in db when db exists
mAssureList = (ArrayList<Assure>) mDBHelper.getListAssure();
//Init adapter
adapter = new ListAssureAdapter(this, mAssureList);
// Save the ListView state (= includes scroll position) as a Parcelable
Parcelable state = lvAssure.onSaveInstanceState();
//Set adapter for listView
lvAssure.setAdapter(adapter);
//Filter list
lvAssure.setTextFilterEnabled(true);
setupSearchView();
// Restore previous state (including selected item index and scroll position)
lvAssure.onRestoreInstanceState(state);
// Start Activity FichePatient with ClickListener
lvAssure.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
int itemId = (int) adapter.getItemId(position-1);
Assure assure = mAssureList.get(itemId);
String id_cnam = assure.getIdcnam();
String type_caiss = assure.getCaissesec();
//String name_ass = assure.getNameAss();
//String naiss_ass = assure.getDateNaissAss();
Intent intent = new Intent(listassurecnam.this,assurecnam.class);
intent.putExtra("CARN",id_cnam);
intent.putExtra("CARN2",type_caiss);
startActivity(intent);
}
});
final ArrayAdapter <String> spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,type_caisse);
//MainActivity.categories is an array filled with strings
spinnerAdapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
spinnerCaisse.setAdapter(spinnerAdapter);
spinnerCaisse.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long itemID) {
String text = spinnerCaisse.getSelectedItem().toString();
if(text.equals("TOUS"))
adapter.getFilter().filter("");
else {
adapter.getFilter().filter(text);
adapter.notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
private void setupSearchView()
{
searchAssure.setIconifiedByDefault(false);
searchAssure.setOnQueryTextListener(this);
searchAssure.setSubmitButtonEnabled(true);
searchAssure.setQueryHint("Chercher un assuré CNAM");
}
@Override
public boolean onQueryTextChange(String newText)
{
if (TextUtils.isEmpty(newText)) {
lvAssure.clearTextFilter();
adapter.getFilter().filter("");
} else {
lvAssure.setFilterText(newText);
}
return true;
}
@Override
public boolean onQueryTextSubmit(String query)
{
return false;
}
}
java android android-studio
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In my project I have made an object class called Assure
with many values such as one called caissesec
. All the assure
are displayed by a ListView and have a set caissesec
Spinner in the layout (with the purpose of categorizing the assure
s with the matching caissesec
).
i filter with searchview
for the name of assure
how to match 2 filter? for example choice the caissesec
(the type of assure
) in the spinner and choice the name of assure
with searchview exist in the type selected
code for my Adapter:
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
final FilterResults oReturn = new FilterResults();
final ArrayList<Assure> results = new ArrayList<Assure>();
if (orig == null)
orig = (ArrayList<Assure>) mAssureList;
if (constraint != null) {
if (orig != null && orig.size() > 0) {
for (final Assure p : orig) {if((mAssureList.get(i).getNomprenom().toLowerCase().contains(constraint.toString())) || mAssureList.get(i).getNomprenom().toUpperCase().contains(constraint.toString()) ||(p.getCaissesec().contains(constraint.toString())) {results.add(p);
}
}
oReturn.values = results;
}
return oReturn;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
mAssureList = (ArrayList<Assure>) results.values;
notifyDataSetChanged();
}
};
}
public void notifyDataSetChanged() {
// either this or: orig = dataSet;
//orig = null;
super.notifyDataSetChanged();
}
ListAssure.java :
public class listassurecnam extends AppCompatActivity implements SearchView.OnQueryTextListener {
ImageView sback;
SearchView searchAssure;
private ListView lvAssure;
private ListAssureAdapter adapter;
//private List<Patient> mPatientList;
private DatabaseHelper mDBHelper;
private ArrayList<Assure> mAssureList;
//private ArrayList<Assure> orig;
Spinner spinnerCaisse;
String type_caisse = {"TOUS","CNSS","CNRPS"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_assurecnam);
sback = (ImageView)findViewById(R.id.menub);
searchAssure = (SearchView)findViewById(R.id.searchViewAssure);
lvAssure = findViewById(R.id.listViewCnam);
mDBHelper = DatabaseHelper.getInstance(this);
mAssureList=new ArrayList<Assure>();
//orig=new ArrayList<Assure>();
spinnerCaisse = findViewById(R.id.spinnerCaisse);
sback.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
Intent it = new Intent(listassurecnam.this,menu.class);
startActivity(it);
}
});
searchAssure = (SearchView) findViewById(R.id.searchViewAssure);
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setHintTextColor(Color.rgb(170,170,170));
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setTextColor(Color.rgb(225,225,225));
//add header to listview
LayoutInflater inflater = getLayoutInflater();
ViewGroup header = (ViewGroup)inflater.inflate(R.layout.listheadercnam, lvAssure, false);
lvAssure.addHeaderView(header, null, false);
//Get patient list in db when db exists
mAssureList = (ArrayList<Assure>) mDBHelper.getListAssure();
//Init adapter
adapter = new ListAssureAdapter(this, mAssureList);
// Save the ListView state (= includes scroll position) as a Parcelable
Parcelable state = lvAssure.onSaveInstanceState();
//Set adapter for listView
lvAssure.setAdapter(adapter);
//Filter list
lvAssure.setTextFilterEnabled(true);
setupSearchView();
// Restore previous state (including selected item index and scroll position)
lvAssure.onRestoreInstanceState(state);
// Start Activity FichePatient with ClickListener
lvAssure.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
int itemId = (int) adapter.getItemId(position-1);
Assure assure = mAssureList.get(itemId);
String id_cnam = assure.getIdcnam();
String type_caiss = assure.getCaissesec();
//String name_ass = assure.getNameAss();
//String naiss_ass = assure.getDateNaissAss();
Intent intent = new Intent(listassurecnam.this,assurecnam.class);
intent.putExtra("CARN",id_cnam);
intent.putExtra("CARN2",type_caiss);
startActivity(intent);
}
});
final ArrayAdapter <String> spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,type_caisse);
//MainActivity.categories is an array filled with strings
spinnerAdapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
spinnerCaisse.setAdapter(spinnerAdapter);
spinnerCaisse.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long itemID) {
String text = spinnerCaisse.getSelectedItem().toString();
if(text.equals("TOUS"))
adapter.getFilter().filter("");
else {
adapter.getFilter().filter(text);
adapter.notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
private void setupSearchView()
{
searchAssure.setIconifiedByDefault(false);
searchAssure.setOnQueryTextListener(this);
searchAssure.setSubmitButtonEnabled(true);
searchAssure.setQueryHint("Chercher un assuré CNAM");
}
@Override
public boolean onQueryTextChange(String newText)
{
if (TextUtils.isEmpty(newText)) {
lvAssure.clearTextFilter();
adapter.getFilter().filter("");
} else {
lvAssure.setFilterText(newText);
}
return true;
}
@Override
public boolean onQueryTextSubmit(String query)
{
return false;
}
}
java android android-studio
In my project I have made an object class called Assure
with many values such as one called caissesec
. All the assure
are displayed by a ListView and have a set caissesec
Spinner in the layout (with the purpose of categorizing the assure
s with the matching caissesec
).
i filter with searchview
for the name of assure
how to match 2 filter? for example choice the caissesec
(the type of assure
) in the spinner and choice the name of assure
with searchview exist in the type selected
code for my Adapter:
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
final FilterResults oReturn = new FilterResults();
final ArrayList<Assure> results = new ArrayList<Assure>();
if (orig == null)
orig = (ArrayList<Assure>) mAssureList;
if (constraint != null) {
if (orig != null && orig.size() > 0) {
for (final Assure p : orig) {if((mAssureList.get(i).getNomprenom().toLowerCase().contains(constraint.toString())) || mAssureList.get(i).getNomprenom().toUpperCase().contains(constraint.toString()) ||(p.getCaissesec().contains(constraint.toString())) {results.add(p);
}
}
oReturn.values = results;
}
return oReturn;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
mAssureList = (ArrayList<Assure>) results.values;
notifyDataSetChanged();
}
};
}
public void notifyDataSetChanged() {
// either this or: orig = dataSet;
//orig = null;
super.notifyDataSetChanged();
}
ListAssure.java :
public class listassurecnam extends AppCompatActivity implements SearchView.OnQueryTextListener {
ImageView sback;
SearchView searchAssure;
private ListView lvAssure;
private ListAssureAdapter adapter;
//private List<Patient> mPatientList;
private DatabaseHelper mDBHelper;
private ArrayList<Assure> mAssureList;
//private ArrayList<Assure> orig;
Spinner spinnerCaisse;
String type_caisse = {"TOUS","CNSS","CNRPS"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_assurecnam);
sback = (ImageView)findViewById(R.id.menub);
searchAssure = (SearchView)findViewById(R.id.searchViewAssure);
lvAssure = findViewById(R.id.listViewCnam);
mDBHelper = DatabaseHelper.getInstance(this);
mAssureList=new ArrayList<Assure>();
//orig=new ArrayList<Assure>();
spinnerCaisse = findViewById(R.id.spinnerCaisse);
sback.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
Intent it = new Intent(listassurecnam.this,menu.class);
startActivity(it);
}
});
searchAssure = (SearchView) findViewById(R.id.searchViewAssure);
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setHintTextColor(Color.rgb(170,170,170));
((EditText)((SearchView)findViewById(R.id.searchViewAssure)).findViewById(((SearchView)findViewById(R.id.searchViewAssure)).
getContext().getResources().getIdentifier("android:id/search_src_text", null, null))).setTextColor(Color.rgb(225,225,225));
//add header to listview
LayoutInflater inflater = getLayoutInflater();
ViewGroup header = (ViewGroup)inflater.inflate(R.layout.listheadercnam, lvAssure, false);
lvAssure.addHeaderView(header, null, false);
//Get patient list in db when db exists
mAssureList = (ArrayList<Assure>) mDBHelper.getListAssure();
//Init adapter
adapter = new ListAssureAdapter(this, mAssureList);
// Save the ListView state (= includes scroll position) as a Parcelable
Parcelable state = lvAssure.onSaveInstanceState();
//Set adapter for listView
lvAssure.setAdapter(adapter);
//Filter list
lvAssure.setTextFilterEnabled(true);
setupSearchView();
// Restore previous state (including selected item index and scroll position)
lvAssure.onRestoreInstanceState(state);
// Start Activity FichePatient with ClickListener
lvAssure.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
int itemId = (int) adapter.getItemId(position-1);
Assure assure = mAssureList.get(itemId);
String id_cnam = assure.getIdcnam();
String type_caiss = assure.getCaissesec();
//String name_ass = assure.getNameAss();
//String naiss_ass = assure.getDateNaissAss();
Intent intent = new Intent(listassurecnam.this,assurecnam.class);
intent.putExtra("CARN",id_cnam);
intent.putExtra("CARN2",type_caiss);
startActivity(intent);
}
});
final ArrayAdapter <String> spinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,type_caisse);
//MainActivity.categories is an array filled with strings
spinnerAdapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
spinnerCaisse.setAdapter(spinnerAdapter);
spinnerCaisse.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long itemID) {
String text = spinnerCaisse.getSelectedItem().toString();
if(text.equals("TOUS"))
adapter.getFilter().filter("");
else {
adapter.getFilter().filter(text);
adapter.notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
private void setupSearchView()
{
searchAssure.setIconifiedByDefault(false);
searchAssure.setOnQueryTextListener(this);
searchAssure.setSubmitButtonEnabled(true);
searchAssure.setQueryHint("Chercher un assuré CNAM");
}
@Override
public boolean onQueryTextChange(String newText)
{
if (TextUtils.isEmpty(newText)) {
lvAssure.clearTextFilter();
adapter.getFilter().filter("");
} else {
lvAssure.setFilterText(newText);
}
return true;
}
@Override
public boolean onQueryTextSubmit(String query)
{
return false;
}
}
java android android-studio
java android android-studio
edited Nov 22 at 10:46
Ankur Aggarwal
1,49122330
1,49122330
asked Nov 22 at 9:52
H.BEN ALI
1
1
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12
add a comment |
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428166%2fmultiple-filtering-a-listview-of-objects-with-a-spinner-by-a-value-within-the-ob%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
help please, i'm blocked
– H.BEN ALI
Nov 23 at 8:12