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 assures 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;
}

}









share|improve this question
























  • help please, i'm blocked
    – H.BEN ALI
    Nov 23 at 8:12















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 assures 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;
}

}









share|improve this question
























  • help please, i'm blocked
    – H.BEN ALI
    Nov 23 at 8:12













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 assures 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;
}

}









share|improve this question















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 assures 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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

What visual should I use to simply compare current year value vs last year in Power BI desktop

Alexandru Averescu

Trompette piccolo