marcohc / roboto-calendar-view Goto Github PK
View Code? Open in Web Editor NEWEasy calendar view with custom fonts
License: Apache License 2.0
Easy calendar view with custom fonts
License: Apache License 2.0
In roboto-calendar-view/library/src/main/res/layout/roboto_calendar_month_layout.xml,
both Imageviews didn't display, so i had to use android:background instead of app:srcCompact.
This happened in Android 6.0, Moto G 3rd Gen.
Using the property markCircleImage1(), markCircleImage2(), etc...
Can only go only up to 4 circles.
When adding the 5th one it gives Error inflating view.
Can any of you tried adding more than 4 circles?
I am getting dynamic date and trying to mark days in roboto calendar view but the dates r 5 days ahead or so .
HEre is my code
int markDate =Integer.parseInt(finalDate);
Calendar calendar =Calendar.getInstance(TimeZone.getDefault());
calendar.set(Calendar.DAY_OF_MONTH,markDate);
robotoCalendarView.markCircleImage1(calendar);
robotoCalendarView.markCircleImage2(calendar);
How to solve this issue
Failed to resolve: com.github.marcohc:robotocalendarview:
i have done this:
Add the repository to your general build.gradle:
repositories {
maven {
url "https://jitpack.io"
}
}
And then add the library in your specific project build.gradle:
compile 'com.github.marcohc:robotocalendarview:<release>'
add please swipe left and right to change the month.
how could i support arabic language in this calendar ?
arabic week begin by saturday not sunday and listeners not work correctly on arabic
Please , Any one has any idea about change this Calendar From Georgian to other type (i.e Hijri ) ??
Kindly , if anyone knows please Respond ASAP .
Regards .
The library works well with English Language. But when I change phone language to another language, it crashes. Below is the log cat:
android.view.InflateException: Binary XML file line #7: Error inflating class com.marcohc.robotocalendar.RobotoCalendarView
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at com.elisoft.recipist.adapter.CalendarViewPagerAdapter.a(Unknown Source)
at android.support.v4.view.ViewPager.a(Unknown Source)
at android.support.v4.view.ViewPager.a(Unknown Source)
at android.support.v4.view.ViewPager.c(Unknown Source)
at android.support.v4.view.ViewPager.onMeasure(Unknown Source)
at com.elisoft.recipist.view.WrapContentHeightViewPager.onMeasure(Unknown Source)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:721)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:612)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at android.support.v7.widget.CardView.onMeasure(Unknown Source)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:721)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:612)
at android.view.View.measure(View.java:18580)
at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:2019)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at android.widget.ScrollView.onMeasure(ScrollView.java:487)
at android.view.View.measure(View.java:18580)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:728)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:464)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:721)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:612)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at android.support.v7.widget.ContentFrameLayout.onMeasure(Unknown Source)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:721)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:612)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:721)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:612)
at android.view.View.measure(View.java:18580)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5827)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2897)
at android.view.View.measure(View.java:18580)
I can change the days of the week to start on Monday but the numbers of the days do not change with it. I tried changing locales around but that doesn't seem to have any effect except changing the language.
Is it possible to do this?
Can you let us know how to make a calendar view scrollable as for now i am not able to scroll it.
For now it use blue for default. If you would change the name of the color in the xml it will be easier to theme it.
How can i be able to import it as a module. I tried the official way of adding roboto-calendar-view as module in my existing project but I'm getting many errors of gradle such as plugin id errors and dependencies issues. Please let me know about it.
I want to switch from monthly view to weekly view or vice-versa. But couldn't find any methods to trigger that, it would have nice if it is possible in roboto calendar view. Thanks in advance
can i add more symbol
The library works well in version 3.6.0, but in version 3.6.1, i faced a problem with xml and it makes my app crash.
Binary XML file line #135: Error inflating class com.marcohc.robotocalendar.RobotoCalendarView
is it possible to show the nxt and prv month days?
Can you pls suggest how can we set Minimum date in Calendar
Can we have two kinds of day in two different types of calendar format into one cell ??
it may look like this:
http://www.ashesh.com.np/images/Nepali-Calendar.png
adding fonts folder in assets but having same error in studio any solution
The default first day of week is SUNDAY. How can I change to other day? It's common on Brazil use monday as first day and in other scenarios in Brazil it's used saturday.
First of all, thank you for sharing good project.
Some country (like Korea) uses one single character to display day of the week and it causes index out of range.
initializeWeekDaysLayout function in RobotoCalendarView.java line 186
dayOfTheWeekString = dayOfTheWeekString.substring(0, 1).toUpperCase() + dayOfTheWeekString.subSequence(1, 2);
It might be better when check length before substring.
Suggestion:
if(dayOfTheWeekString.length() > 1) {
dayOfTheWeekString = dayOfTheWeekString.substring(0, 1).toUpperCase() + dayOfTheWeekString.subSequence(1, 2);
}
thanks!
what i did is instead of onDayClick i use the day click (red) circle for holiday list and it is working fine if the month is current calendar month(You can find in my image1) you can also check below listview for date. now i want the days to be marked also for next/previous month on rightButtonClick/leftbuttonClick i.e. next month holiday but i am unable to get that what i am getting is layout plan of current month and dates selected for next month. find it on image2
@Override public void onDayClick(Date date) { Toast.makeText(this, "onDayClick: " + date, Toast.LENGTH_SHORT).show(); }
Hello,
I would like to know how to change styles correctly.
I was able to change some of the text sizes and margins by overriding dimens.xml.
Is there a way to change the shape of the day marks from lines to circles?
Regards,
Mathías.
Android Studio 3.6.1
I tried use the below implementation in the sample project instead of the library
implementation 'com.github.marcohc:robotocalendarview:3.6.1'
and i get the below error when launching the sample app
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.marcohc.robotocalendarsample, PID: 19606
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.marcohc.robotocalendarsample/com.marcohc.robotocalendar.sample.MainActivity}: android.view.InflateException: Binary XML file line #5 in com.marcohc.robotocalendarsample:layout/activity_main: Binary XML file line #5 in com.marcohc.robotocalendarsample:layout/activity_main: Error inflating class com.marcohc.robotocalendar.RobotoCalendarView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3792)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3968)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: android.view.InflateException: Binary XML file line #5 in com.marcohc.robotocalendarsample:layout/activity_main: Binary XML file line #5 in com.marcohc.robotocalendarsample:layout/activity_main: Error inflating class com.marcohc.robotocalendar.RobotoCalendarView
Caused by: android.view.InflateException: Binary XML file line #5 in com.marcohc.robotocalendarsample:layout/activity_main: Error inflating class com.marcohc.robotocalendar.RobotoCalendarView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:852)
at android.view.LayoutInflater.createView(LayoutInflater.java:774)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:211)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:237)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1067)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:995)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)
at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.marcohc.robotocalendar.sample.MainActivity.onCreate(MainActivity.java:48)
at android.app.Activity.performCreate(Activity.java:8198)
at android.app.Activity.performCreate(Activity.java:8182)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3765)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3968)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lio/github/inflationx/viewpump/ViewPump;
at com.marcohc.robotocalendar.RobotoCalendarView.init(RobotoCalendarView.java:212)
at com.marcohc.robotocalendar.RobotoCalendarView.(RobotoCalendarView.java:130)
... 35 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.github.inflationx.viewpump.ViewPump" on path: DexPathList[[zip file "/data/app/~~pqXAq33kYFw3NqBT98BOAw==/com.marcohc.robotocalendarsample-72Al5ImUnSHGRpLy5plsUg==/base.apk"],nativeLibraryDirectories=[/data/app/~~pqXAq33kYFw3NqBT98BOAw==/com.marcohc.robotocalendarsample-72Al5ImUnSHGRpLy5plsUg==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 37 more
Hey thanks for a wonderful library.
Do you have any future plan to develop it to next level like showing count on date for showing number of events on particular date or any such thing.
And how to clear all underline Lines marked
Hi, Thank you for share your code, is amazing. I have a question, if I want to mark a day in a concret month I have do like this:
if(currentMonthIndex==3){
final Calendar calendar = Calendar.getInstance(Locale.getDefault());
calendar.add(calendar.DAY_OF_MONTH, 28);
robotoCalendarView.markDayWithStyle(RobotoCalendarView.GREEN_CIRCLE, calendar.getTime());
robotoCalendarView.markDayAsCurrentDay(calendar.getTime());
}
But if I do this and I execute the marked day of march is 18 and not 28. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.