1

I created a Caldroid fragment and i would like to populate it with daily event when initializing and every month changes event from server data.

I planning to write an Asyntask with month parameter to get data from server. Then store them into an Array with Date and Object later pass this array to a customAdapter that extend CaldroidGridAdapter.

And finally bind them to oncreate and monthChanges event.

The problem is i don't know the correct way to overwrite a CaldroidGridAdapter with my needs.

Is anyone know how to overwrite it?

Jacky Chong
  • 172
  • 1
  • 10

1 Answers1

0

There is a caldroid listener . You sould do what you need inside onChangeMonth

CaldroidFragment caldroidFragment = new CaldroidFragment()

caldroidFragment.setCaldroidListener(new CaldroidListener() {
    @Override
    public void onSelectDate(Date date, View view) {

    }

    @Override
    public void onCaldroidViewCreated() {
        super.onCaldroidViewCreated();
    }

    @Override
    public void onChangeMonth(int month, int year) {
        super.onChangeMonth(month, year);
        /*Do whatever you want*/
    }
});
Mithun Sarker Shuvro
  • 3,902
  • 6
  • 32
  • 64