3
How to disable the day of the week example:I have calendar, I spent the day of the week by parameter in the case Monday, Thursday and Sunday to schedule service. How do I disable Tuesday, Wednesday and Friday using timessquare Calendarpickerview?
I’ve looked in some places where the init() method can disable the day but I couldn’t get it to take only the day of the week.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="webservice.tablayout.teste"
android:id="@+id/layout">
public class AgendarActivity extends AppCompatActivity implements View.OnClickListener {
private Servico servico;
private SimpleDateFormat sdFormat;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_agendar);
Calendar nextYear = Calendar.getInstance();
nextYear.add(Calendar.DAY_OF_WEEK, 1);
CalendarPickerView calendar = (CalendarPickerView) findViewById(R.id.calendarPV);
Date today = new Date();
calendar.init(today, nextYear.getTime()).withSelectedDate(today);
}
In case I do not need to make these flexibilities to paint, in case I would need the most important result that in question would disable the days of the week, I will perform test with Datetimepicker and I return to give an answer, thanks for the help ;)
– Matheus
@Matheus cool! Hopefully you can solve the problem. If you have more questions about, comment! Hug
– Mateus
I gave a search I could not find the method that when I click on the calendar calls a method, you can tell me which is ?
– Matheus