Android Open Source - android-calendar-api-sample Calendar Content Provider Fragment






From Project

Back to project page android-calendar-api-sample.

License

The source code is released under:

MIT License

If you think the Android project android-calendar-api-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.roottony.calendar;
/* w ww.  j  a v  a  2  s  . c o  m*/
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class CalendarContentProviderFragment extends Fragment {

    private static final int TITLE_RESOURCE = R.string.title_content_provider_demo;

    public static CalendarContentProviderFragment newInstance() {
        return new CalendarContentProviderFragment();
    }

    public CalendarContentProviderFragment() {
    }

    public static int getTitleResource() {
        return TITLE_RESOURCE;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_calendar_content_provider, container, false);

        CalendarUtil.printCalendars(getActivity());
        CalendarUtil.printEvents(getActivity());
        CalendarUtil.printEventInstances(getActivity());
        CalendarUtil.printReminders(getActivity());
        CalendarUtil.printAttendees(getActivity());

        return rootView;
    }
}




Java Source Code List

com.roottony.calendar.CalendarContentProviderFragment.java
com.roottony.calendar.CalendarIntentFragment.java
com.roottony.calendar.CalendarUtil.java
com.roottony.calendar.MainActivity.java