B4A Library CoupleCalendar

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Feb 2, 2019.

  1. DonManfred

    DonManfred Expert Licensed User

    This is a wrap for this Github project.

    Author: yuyakaido (Github)/DonManfred (Wrapper)
    Version: 0.1
    • CCEvent
      • Functions:
        • Initialize (EventName As String)
        • IsInitialized As Boolean
        • setDurationType
      • Properties:
        • DurationType As com.yuyakaido.android.couplescalendar.model.DurationType [read only]
        • EndAt As Long
        • EndAtDateTime As Long [read only]
        • EventColor As Int
        • EventDays As java.util.List [read only]
        • EventType As com.yuyakaido.android.couplescalendar.model.EventType
        • LinePosition As com.yuyakaido.android.couplescalendar.model.LinePosition
        • RecurrenceRule As String
        • StartAt As java.util.Date
    • CouplesCalendarView
      • Events:
        • onDateClick (date As Long)
        • onMonthChange (date As Long)
      • Functions:
        • BringToFront
        • DesignerCreateView (base As Panel, lw As Label, props As Map)
        • Initialize (EventName As String)
        • Invalidate
        • Invalidate2 (arg0 As android.graphics.Rect)
        • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
        • IsInitialized As Boolean
        • RemoveView
        • RequestFocus As Boolean
        • SendToBack
        • SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable
        • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
        • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
        • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
        • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
      • Properties:
        • Background As android.graphics.drawable.Drawable
        • Color As Int [write only]
        • Enabled As Boolean
        • ETNormal As com.yuyakaido.android.couplescalendar.model.EventType [read only]
        • ETRecurring As com.yuyakaido.android.couplescalendar.model.EventType [read only]
        • ETTransient As com.yuyakaido.android.couplescalendar.model.EventType [read only]
        • Events As List [write only]
        • Height As Int
        • Left As Int
        • LinePositionLower As com.yuyakaido.android.couplescalendar.model.LinePosition [read only]
        • LinePositionUpper As com.yuyakaido.android.couplescalendar.model.LinePosition [read only]
        • Padding As Int()
        • Parent As Object [read only]
        • Tag As Object
        • Theme As com.yuyakaido.android.couplescalendar.model.Theme
        • ThemeBlue As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeGREEN As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeLIGHT_BLUE As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeNAVY_BLUE As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeORANGE As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemePINK As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemePURPLE As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeRED As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeTIFFANY_BLUE As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • ThemeYELLOW As com.yuyakaido.android.couplescalendar.model.Theme [read only]
        • Top As Int
        • Visible As Boolean
        • Width As Int

    Dim evList As List

    Dim event As CCEvent
    Dim startAt As Long = DateTime.DateTimeParse("01/12/2019","08:00:00")
    Dim endAt As Long = DateTime.DateTimeParse("01/14/2019","08:30:00")
    event.StartAt = startAt
    event.EndAt = endAt
    event.EventColor = Colors.Blue
    event.LinePosition = ccv1.LinePositionUpper

    Dim event As CCEvent
    Dim startAt As Long = DateTime.DateTimeParse("02/01/2019","00:00:00")
    Dim endAt As Long = DateTime.DateTimeParse("02/01/2019","23:59:59")
    event.StartAt = startAt
    event.EndAt = endAt
    event.EventColor = Colors.Black
    event.LinePosition = ccv1.LinePositionUpper

    Dim event As CCEvent
    Dim startAt As Long = DateTime.DateTimeParse("02/02/2019","00:00:00")
    Dim endAt As Long = DateTime.DateTimeParse("02/02/2019","22:00:00")
    event.StartAt = startAt
    event.EndAt = endAt
    event.EventColor = Colors.Magenta
    event.LinePosition = ccv1.LinePositionUpper

    Dim event As CCEvent
    Dim startAt As Long = DateTime.DateTimeParse("02/18/2019","00:00:00")
    Dim endAt As Long = DateTime.DateTimeParse("02/22/2019","00:00:00")
    event.StartAt = startAt
    event.EndAt = endAt
    event.EventColor = Colors.Red
    event.LinePosition = ccv1.LinePositionLower

        ccv1.Events = evList
        ccv1.Theme = ccv1.ThemeGREEN
    results in
    WhatsApp Image 2019-02-02 at 08.19.15.jpeg

    Attached Files:

    Last edited: Feb 3, 2019
  2. Harris

    Harris Well-Known Member Licensed User

    I thought from the name - it was a calendar - for couples (like man and wife, girlfriend, etc...).
    It would sync their engagements, share each others calendar... Silly me.
    What's in a name?
    Sasuke Sama likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    Ask the github author :D

    I just took the name given...
    I guess couples here are more than one event on a day (visible). maybe... Dont know ;-)
    Peter Simpson and Harris like this.
  4. Harris

    Harris Well-Known Member Licensed User

    and you claim you can't readily understand / interpret english...
    Could easily fool me, brother... Can't imagine what my statement would translate into your language.
    You guys are amazing - compared to us low lifes on the North American continent.
  5. DonManfred

    DonManfred Expert Licensed User

    Did i bother you in some kind? Or did i misinterpret this now?

    If i did bother you in some way; it was not my intention.

    I usually do not give much interpretion in a name of a java class. I just take it

    so i write a CouplesCalendarViewwrapper which is the wrap for the original.
    And in this case, the libraryname is just taken from the githubs project main class
  6. Harris

    Harris Well-Known Member Licensed User

    I said BROTHER- not BOTHER. So similar spelling - yet different meanings entirely (the problem with english).

    Brother is what we say for: my close friend - part of my immediate family - someone who is near and dear to me.
    It is often used as a slang term we use (here) to imply love and respect among men.
    I think it may have originated from the African/American culture here in North America (which many of us have adopted).

    Women may use a different term to imply the same thing.

    Sorry for hi-jacking your thread here, I couldn't resist.
    Oh, the language barrier... With all of the translate technology - it still fails from time to time...

    Hey, we learn something new everyday (hopefully).
  7. DonManfred

    DonManfred Expert Licensed User

    and i did understand it correctly. I just was irritate about the

    i interpreted it to be something that i said the wrong somehow.
    Sorry, i guess this is the result of being english not my native language and sometimes i do not understand correctly or wrong.

    Peace :)
    Harris likes this.
  8. Harris

    Harris Well-Known Member Licensed User

    You say I know nothing Mr. Fawlty - but I learn - I learn!!!!!

    My tag line... We all learn... hopefully everyday.
  9. Sasuke Sama

    Sasuke Sama Active Member Licensed User

    me too XD
  10. Pencil3

    Pencil3 Member Licensed User

    Tried the example (CoupleCalendarEx.zip) and recieve the below error:

    ERROR: resource directory '..\res.couplescalendar' does not exist
  11. DonManfred

    DonManfred Expert Licensed User

    Extract the zip to your project folder so that the folder in the zip (res.Couplecalendar) is in your projectfolder.

    Attached Files:

  12. Adson Figueiredo Lima

    Adson Figueiredo Lima New Member Licensed User

    Good night,
    This error is occurring with the date 10/20/2019.

    java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:304)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
    Caused by: java.lang.IllegalArgumentException: Illegal instant due to time zone offset transition: 2019-10-20T03:00:00.000
    at org.joda.time.chrono.ZonedChronology.localToUTC(ZonedChronology.java:143)
    at org.joda.time.chrono.ZonedChronology.getDateTimeMillis(ZonedChronology.java:119)
    at org.joda.time.chrono.AssembledChronology.getDateTimeMillis(AssembledChronology.java:133)
    at org.joda.time.base.BaseDateTime.<init>(BaseDateTime.java:254)
    at org.joda.time.base.BaseDateTime.<init>(BaseDateTime.java:195)
    at org.joda.time.DateTime.<init>(DateTime.java:460)
    at com.yuyakaido.android.couplescalendar.util.CalendarUtils.getMidnight(CalendarUtils.java:46)
    at com.yuyakaido.android.couplescalendar.model.InternalEvent.getEventDays(InternalEvent.java:118)
    at com.yuyakaido.android.couplescalendar.util.EventCache.createCacheIn(EventCache.java:84)
    at com.yuyakaido.android.couplescalendar.util.EventCache.createDefaultCache(EventCache.java:110)
    at com.yuyakaido.android.couplescalendar.util.EventCache.init(EventCache.java:45)
    at com.yuyakaido.android.couplescalendar.ui.CouplesCalendarView$2.doInBackground(CouplesCalendarView.java:154)
    at com.yuyakaido.android.couplescalendar.ui.CouplesCalendarView$2.doInBackground(CouplesCalendarView.java:151)
    at android.os.AsyncTask$2.call(AsyncTask.java:292)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    ... 4 more
    ** Activity (app) Pause, UserClosed = true **
  13. Ian Garton

    Ian Garton Member Licensed User

    Where do I get:
    #AdditionalJar: joda-time-2.1.jar
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice