misosvec / SingleRowCalendar

Android library for horizontal single row calendar. With this library, you aren't attached to library built-in UI. You can create really beautiful and customizable UI and use selection features without hands getting dirty with RecyclerView and SelectionTracker.
Apache License 2.0
370 stars 53 forks source link

Use in JAVA #7

Open rahulshah007 opened 4 years ago

rahulshah007 commented 4 years ago

Is there any way to use this library in the JAVA project or I need to use strictly Koitlin for this?

MriDx commented 4 years ago

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Androstark commented 4 years ago

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Hi i am also using java but in the bindDataToCalenderView method when using the holder.itemView doesn't find any view to set the text. Can you please help me

MriDx commented 4 years ago

Screenshot_20200927-165122 Try like this

MriDx commented 4 years ago

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Hi i am also using java but in the bindDataToCalenderView method when using the holder.itemView doesn't find any view to set the text. Can you please help me

@Override public void bindDataToCalendarView(@NotNull SingleRowCalendarAdapter.CalendarViewHolder calendarViewHolder, @NotNull Date date, int i, boolean b) { ((MaterialTextView) calendarViewHolder.itemView.findViewById(R.id.tv_month_calendar_item)).setText(getMonth3Later(date)); ((MaterialTextView) calendarViewHolder.itemView.findViewById(R.id.tv_date_calendar_item)).setText(DateUtils.INSTANCE.getDayNumber(date)); ((MaterialTextView) calendarViewHolder.itemView.findViewById(R.id.tv_day_calendar_item)).setText(DateUtils.INSTANCE.getDay3LettersName(date)); }

try like this

aruns2896 commented 2 years ago

@MriDx Not getting the object itemView from calendarViewHolder

How can you able to get that?

MamtaSiddhi commented 2 years ago

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Will you plz explain it how you done it ?

MriDx commented 2 years ago

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Will you plz explain it how you done it ?

What problem are you facing ?

MamtaSiddhi commented 2 years ago

Same unable to get ItemView in java code implemented sdk of it

no, it can be implemented in java codes too. I used this library for one of my project with java , android

Will you plz explain it how you done it ?

What problem are you facing ?

Same unable to get ItemView in java code implemented sdk of it

MriDx commented 2 years ago

@MamtaSiddhi You won't get the itemview directly, you will receive viewholder of type "CalendarViewHolder".

MamtaSiddhi commented 2 years ago

Tried but not get it

calendarViewHolder.getItemDetails

getting this

not View

MriDx commented 2 years ago

Tried but not get it

calendarViewHolder.getItemDetails

getting this

not View

View itemView = calendarViewHolder.itemView;

itemView.findViewById(R.id.viewId).setText("hello world");

access it like this

sahil1772 commented 2 years ago

Tried but not get it calendarViewHolder.getItemDetails getting this not View

View itemView = calendarViewHolder.itemView;

itemView.findViewById(R.id.viewId).setText("hello world");

access it like this

Sorry but it returns getItemDetails() no matter how you accept the data. The itemView object is never returned. How do you handle the getItemDetails to receive at least the Id of the Views in it?