calendarview

Using multiple DotSpan's in MaterialCalendarView

心不动则不痛 提交于 2019-12-03 00:36:17
Is there any way of attaching more than 1 DotSpan's to a date with Android MaterialCalendarView? Altough I have 2 DotSpan's added to my CalendarView it's still displaying only 1 DotSpan... I'm using the following code: @Override public boolean shouldDecorate(CalendarDay day) { day.copyTo(calendar); for (int i = 0; i < weekDayStrTmp.size(); i++) { if (weekDayStrTmp.contains(day)) { return true; } else { return false; } } return false; } @Override public void decorate(DayViewFacade view) { view.addSpan(new DotSpan(8, myContext.getResources().getColor(R.color.myColor3))); view.addSpan(new DotSpan

Android custom calendar view disable specific dates

喜欢而已 提交于 2019-12-02 02:56:39
问题 i'm new to android developing and started to develop an booking app. There is a calendar view and i want to disable booked dates in that calendar. I found out that disabling feature is not there in android default calendar. so could you please help me to find a good custom calendar view that can disable specific dates. I need a resource or a library. Thank you! 回答1: Include CalendarPickerView in your layout XML. <com.squareup.timessquare.CalendarPickerView android:id="@+id/calendar_view"

Android custom calendar view disable specific dates

自古美人都是妖i 提交于 2019-12-02 01:41:31
i'm new to android developing and started to develop an booking app. There is a calendar view and i want to disable booked dates in that calendar. I found out that disabling feature is not there in android default calendar. so could you please help me to find a good custom calendar view that can disable specific dates. I need a resource or a library. Thank you! Include CalendarPickerView in your layout XML. <com.squareup.timessquare.CalendarPickerView android:id="@+id/calendar_view" android:layout_width="match_parent" android:layout_height="match_parent"/> In the onCreate of your activity

CalendarView today date item click

拥有回忆 提交于 2019-12-01 17:44:18
I searched a lot on the internet and I couldn't succeed to find correct solution for CalendarView click on today date. I need to use CalendarView for events app. setOnDateChangeListener works good for other day clicks. Code: CalendarView calendarView=(CalendarView) findViewById(R.id.calendarView1); calendarView.setOnDateChangeListener(new OnDateChangeListener() { @Override public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) { Intent k = new Intent(GlavnaAktivnost.this, DatumDetalji.class); k.putExtra("godina", year); k.putExtra("mesec", month); k.putExtra(

CalendarView today date item click

允我心安 提交于 2019-12-01 16:28:17
问题 I searched a lot on the internet and I couldn't succeed to find correct solution for CalendarView click on today date. I need to use CalendarView for events app. setOnDateChangeListener works good for other day clicks. Code: CalendarView calendarView=(CalendarView) findViewById(R.id.calendarView1); calendarView.setOnDateChangeListener(new OnDateChangeListener() { @Override public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) { Intent k = new Intent

How to set focus on a specific date in CalendarView knowing date is “dd/mm/yyyy”

南笙酒味 提交于 2019-12-01 12:39:41
I'm trying to figure out how to set a focus on a specific date in CalendarView during activity creation, The date is known and stored in a separate string variable, lets say theDate and has format of dd/mm/yyyy Knowing this, can I make calendar focus on a specific date? Assume calendar view is mCalendarView in this case. Try this method in CalendarView: http://developer.android.com/reference/android/widget/CalendarView.html#setDate(long) As for converting between the dd/mm/yyyy format to milliseconds format, I recommend that you store the date in millisecond format and only convert to the dd

Using CalendarView with databinding

巧了我就是萌 提交于 2019-12-01 11:23:04
I want to use two-way databinding with Android LiveData components ( as an alternative for Observable fields . Here's code for simple project with CalendarView and EditText that displays both info on button clicked. <?xml version="1.0" encoding="utf-8"?> <layout> <data> <variable name="testDate" type="android.arch.lifecycle.MutableLiveData<Long>" /> <variable name="testString" type="android.arch.lifecycle.MutableLiveData<String>" /> </data> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas

Using CalendarView with databinding

☆樱花仙子☆ 提交于 2019-12-01 08:13:25
问题 I want to use two-way databinding with Android LiveData components (as an alternative for Observable fields. Here's code for simple project with CalendarView and EditText that displays both info on button clicked. <?xml version="1.0" encoding="utf-8"?> <layout> <data> <variable name="testDate" type="android.arch.lifecycle.MutableLiveData<Long>" /> <variable name="testString" type="android.arch.lifecycle.MutableLiveData<String>" /> </data> <LinearLayout xmlns:android="http://schemas.android

calendarview stops scrolling when nested in scrollview in android

回眸只為那壹抹淺笑 提交于 2019-12-01 07:07:57
问题 I have nested calendarview in ScrollView . My problem begins when height of view increases. I can scroll calendar months vertically but when scrollview scrollbar comes it does not let scroll calendar. Instead of scrolling calendar the whole view scroll up or down. <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fillViewport="true"> <LinearLayout android

Add event to CalendarView

江枫思渺然 提交于 2019-12-01 05:50:18
I think the question says it all: is it possible to display events in the Android default CalendarView ? I know that it is made for widgets and not for a real Calendar application but my app should not be a Calendar application. It is only a little feature in my app so I think the View is perfect for my claims. I only can't view events in it, otherwise it is perfect for me. I read this answer and tried to overwrite the onDraw method from CalenderView : @Override protected void onDraw(Canvas canvas) { p = new Paint(); p.setColor(Color.RED); p.setStrokeWidth(10); super.onDraw(canvas); canvas