I'm using MaterialDatePicker, but it's slow.
public class MainActivity extends AppCompatActivity
{
MaterialDatePicker.Builder<Long> datePickerBuilder;
MaterialDatePicker<Long> datePicker;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
datePickerBuilder = MaterialDatePicker.Builder.datePicker();
datePicker = datePickerBuilder.build();
Button btn = findViewById(R.id.btn);
btn.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
datePicker.show(getSupportFragmentManager(), null);
}
});
}
}
When the button is pressed for the first time it takes 3 seconds for the Date picker to show. On subsequent button clicks, it open in 1 second. After the selecting a date in date picker gives lag, it's not smooth as you would expect it to be.
Is there any solution to this?
EDIT: It seems there are more bugs. There is a lag when changing months by horizontal scrolling and a lot of times, it will slide 2-3 times and end up choosing the wrong month. I don't think MaterialDatePicker is usable, the UX is too bad.