here I have a calendar in a fragment and I would like, when clicking on a date, that we are sent on a new activity with the date (on which we clicked). So how can i send the date in a new activity when I click on a calendar date ? For now, i have this
import android.icu.util.Calendar;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.CalendarView;
import android.widget.TextView;
import android.widget.Toast;
import butterknife.Bind;
import butterknife.ButterKnife;
public class Tab2Calendrier extends Fragment {
@Bind(R.id.calendar)
CalendarView calendar;
@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.tab2calendrier, container, false);
ButterKnife.bind(this, rootView);
calendar.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
@Override
public void onGlobalLayout()
{
}
});
return rootView;
}
}
Thanks