use of nodomain.freeyourgadget.gadgetbridge.adapter.AppBlacklistAdapter in project Gadgetbridge by Freeyourgadget.
the class AppBlacklistActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appblacklist);
RecyclerView appListView = (RecyclerView) findViewById(R.id.appListView);
appListView.setLayoutManager(new LinearLayoutManager(this));
appBlacklistAdapter = new AppBlacklistAdapter(R.layout.item_app_blacklist, this);
appListView.setAdapter(appBlacklistAdapter);
SearchView searchView = (SearchView) findViewById(R.id.appListViewSearch);
searchView.setIconifiedByDefault(false);
searchView.setIconified(false);
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
appBlacklistAdapter.getFilter().filter(newText);
return true;
}
});
}
Aggregations