huanghaibin-dev / CalendarView

Android上一个优雅、万能自定义UI、仿iOS、自定义动画,支持垂直、水平方向切换、支持周视图、自定义周起始、性能高效的日历控件,支持热插拔实现的UI定制!支持标记、自定义颜色、农历、自定义月视图各种显示模式等。Canvas绘制,速度快、占用内存低,你真的想不到日历居然还可以如此优雅!An elegant, highly customized and high-performance Calendar Widget on Android.
Apache License 2.0
9.16k stars 1.8k forks source link

No English Language #70

Closed monowar1993 closed 6 years ago

monowar1993 commented 6 years ago

Hello, Its really a great library with lots of customization. Is there any way to have support for English Language? All strings used in this library is in Chinese. Is there any way to get them on English?

huanghaibin-dev commented 6 years ago

I'm sorry, all the comments in the library are in chinese. All strings come from festivals. I do my best to support English in the next version. my english is so poor

monowar1993 commented 6 years ago

Comments are okay. But lunar day names, months names should be in English. You can use android localization to create separate string,xml file for English and Chinese. I also have a question. Can I add multiple scheme in a single date?

huanghaibin-dev commented 6 years ago

Of course, You need to use custom MonthView and WeekView. I suggest putting information into scheme, such as scheme= "info1_info2_info3", and then drawing to canvas based on different information. Thank you for your advice.

monowar1993 commented 6 years ago

Can I add multiple scheme by using schemes.add(getSchemeCalendar(year, month, 25, 0xFFedc56d, "Football game")); schemes.add(getSchemeCalendar(year, month, 25, 0xFF13acf0, "Dinner at night"));

I want them separate.

huanghaibin-dev commented 6 years ago

Sorry, the current version is not supported multiple scheme color, I will continue to improve.

monowar1993 commented 6 years ago

It is very necessary. Thanks for making such a cool library. Please improve by adding English strings and multiple scheme support for single date.

huanghaibin-dev commented 6 years ago

Hello, the new version has been released. Thank you for your support.

monowar1993 commented 6 years ago

thanks for the update. Also to customize there should be option to add from xml. That will give more flexibility for UI design.

huanghaibin-dev commented 6 years ago

It's not good for memory by using XML layout,I don't know how to express,Using XML Layout will increase at least 3*42 Views. if use lunar calendar, it will increase 402 Views at least.

monowar1993 commented 6 years ago

calendar

How Can I achieve a cell like that. White circle with three dots. Those three dots represents 3 different types of scheme/reminder. Can you help me regrading this. If you can provide a example in your demo. That would be great mate. Also a full solid circle background for selected date is also needed. I tried but couldn't produce what I want.

huanghaibin-dev commented 6 years ago

Please wait a moment,No problem.

huanghaibin-dev commented 6 years ago

@monowar1993 I've done it. Please look at the solar package.

monowar1993 commented 6 years ago

Thats really great. Thanks mate.

monowar1993 commented 6 years ago

Hello mate. I found an issue. I am developing a app with lots of schemes. So the schemes data is growing all the time as I swipe from months to months. Cause on monthSelected I am adding data to schemes. When I swipe too far and too fast java.util.concurrentmodificationexception occurs. Please look into this issue.

huanghaibin-dev commented 6 years ago

@monowar1993 When you using foreach, don't add scheme in other thread, You can stick out your key code

monowar1993 commented 6 years ago

So you are saying I'll need to add schemes on Main thread?

huanghaibin-dev commented 6 years ago

Yes,when ArrayList use iterator,don.t modify it, this operation is wrong