Guruh talabasi Axmedov Zokirjonning


@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {


Download 0.78 Mb.
bet8/10
Sana28.12.2022
Hajmi0.78 Mb.
#1020627
1   2   3   4   5   6   7   8   9   10
Bog'liq
individual proyekt (2)

@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {


}


@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
String key = String.valueOf(queryDate.getText());
searchAnswerByDate(key);
}


@Override
public void afterTextChanged(Editable s) {


}
});
}


public void back_main(View view){
onBackPressed();
}


public void getBooks(){
booksRecycler = findViewById(R.id.listBook);
dbHelper = new DBHelper(this);
booksRecycler.hasFixedSize();
booksRecycler.setLayoutManager(new LinearLayoutManager(this));
list_book = dbHelper.list_book();
adapter = new Adapter(list_book , this);
booksRecycler.setAdapter(adapter);
}


public void searchAnswer(String key){
booksRecycler = findViewById(R.id.listBook);
dbHelper = new DBHelper(this);
booksRecycler.hasFixedSize();
booksRecycler.setLayoutManager(new LinearLayoutManager(this));
search = dbHelper.search(key);
adapter = new Adapter(search , this);
booksRecycler.setAdapter(adapter);
}


public void searchAnswerByDate(String key){
booksRecycler = findViewById(R.id.listBook);
dbHelper = new DBHelper(this);
booksRecycler.hasFixedSize();
booksRecycler.setLayoutManager(new LinearLayoutManager(this));
search = dbHelper.searchByDate(key);
adapter = new Adapter(search , this);
booksRecycler.setAdapter(adapter);
}
}

Download 0.78 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling