import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SearchView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import com.example.tomreaddle.kutubxona.DB.DBHelper;
import com.example.tomreaddle.kutubxona.POJO.Adapter;
import com.example.tomreaddle.kutubxona.POJO.book;
import java.util.List;
public class user extends AppCompatActivity{
RecyclerView booksRecycler;
DBHelper dbHelper;
EditText query , queryDate;
private List list_book , search;
private Adapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user);
getBooks();
query = findViewById(R.id.query);
query.addTextChangedListener(new TextWatcher() {
@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(query.getText());
searchAnswer(key);
}
@Override
public void afterTextChanged(Editable s) {
}
});
queryDate = findViewById(R.id.queryDate);
queryDate.addTextChangedListener(new TextWatcher() {
Do'stlaringiz bilan baham: |