PagerDatePicker icon indicating copy to clipboard operation
PagerDatePicker copied to clipboard

Date and position called twice and result not same with selected one

Open nit3dl opened this issue 7 years ago • 0 comments

When I try to slide or click the date, the result is not same with what I select it, the date is sometimes next date or prev date and the result is called twice or more.

What I found out that OnViewCreated is called more than once in SimplePageFragment

@Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        TextView tvDate = view.findViewById(R.id.tv_date_label);
        TextView tvPosition = view.findViewById(R.id.tv_position_label);

        tvDate.setText(SIMPLE_DATE_FORMAT.format(date));
        tvPosition.setText(String.valueOf(position));
        Log.e("DATE RESULT", SIMPLE_DATE_FORMAT.format(date));

    }

How to fix this problem ?

nit3dl avatar Nov 25 '17 15:11 nit3dl