B4A Library PersianCalendarView

Johan Schoeman

Expert
Licensed User
It is a "shortcut" wrap for this Github project. My interest was purely to get the Arabic / Persian characters / numbers to display - whether they are correct is another question altogether. But I have done it the way I understand it - thanks to @Erel's posting here (https://www.b4x.com/android/forum/threads/persian-characters-in-java-project.79035/#post-500773)

Posting:
1. B4A sample project
2. B4A lib files (PersianCalendarViewLibFiles.zip) - copy them to your additional libs folder
3. resourse.zip - extract and copy the folder and its contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
4. OtherLibFiles.zip - extract them and copy them to your additional libs folder.
5. DemoRes.zip and LibRes.zip - extract and copy the folders and thier contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
6. You will need a most recent version of android-support-v4.jar in you additional libs folder
7. The Java code
8. PersianCalendarViewLibFiles.zip - extract and copy the jar and xml to your additional library folder.
9.fonts.zip - extract the folder and copy the folder and its contents to be a subfolder of the B4A /Files folder

Note:
a. Using B4A version 6.50.
b. AppCompat should be enabled (it should show as V6.50 with the .aar file that is included))

You should get this:

1.png


How to change/amend it and what it is saying (and if correct) - I leave that up to you...

Click on a date and fling it left / right. See the toast messages (no idea what they are saying).
 

Attachments

Last edited:
hi, in my computer i have a lot of bug
.........................................................................................................................................................................................................................................................................
java.lang.RuntimeException: Font asset not found fonts/NotoNaskhArabic-Regular.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:947)
at ir.mirrajabi.persiancalendar.core.PersianCalendarHandler.initTypeface(PersianCalendarHandler.java:123)
at ir.mirrajabi.persiancalendar.core.PersianCalendarHandler.setFont(PersianCalendarHandler.java:131)
at ir.mirrajabi.persiancalendar.core.adapters.MonthAdapter.onBindViewHolder(MonthAdapter.java:177)
at ir.mirrajabi.persiancalendar.core.adapters.MonthAdapter.onBindViewHolder(MonthAdapter.java:19)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6310)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6343)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5289)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5552)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5394)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5390)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2149)
at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:556)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1496)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:593)
at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3537)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3266)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3798)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1795)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:22415)
at android.view.ViewGroup.layout(ViewGroup.java:6594)
at android.widget.FrameLayout.layo
Message longer than Log limit (4000). Message was truncated.
...................................................................................................................................................................................................................

pleas help me what is this ?
 

DonManfred

Expert
Licensed User
pleas help me what is this ?
The error is clear
java.lang.RuntimeException: Font asset not found fonts/NotoNaskhArabic-Regular.ttf
The font is missing

Recheck the example and how it is implemented here

Follow the instructions:

Posting:
1. B4A sample project
2. B4A lib files (PersianCalendarViewLibFiles.zip) - copy them to your additional libs folder
3. resourse.zip - extract and copy the folder and its contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
4. OtherLibFiles.zip - extract them and copy them to your additional libs folder.
5. DemoRes.zip and LibRes.zip - extract and copy the folders and thier contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
6. You will need a most recent version of android-support-v4.jar in you additional libs folder
7. The Java code
8. PersianCalendarViewLibFiles.zip - extract and copy the jar and xml to your additional library folder.
9.fonts.zip - extract the folder and copy the folder and its contents to be a subfolder of the B4A /Files folder
 

DonManfred

Expert
Licensed User

mojkodaba

Member
It is a "shortcut" wrap for this Github project. My interest was purely to get the Arabic / Persian characters / numbers to display - whether they are correct is another question altogether. But I have done it the way I understand it - thanks to @Erel's posting here (https://www.b4x.com/android/forum/threads/persian-characters-in-java-project.79035/#post-500773)

Posting:
1. B4A sample project
2. B4A lib files (PersianCalendarViewLibFiles.zip) - copy them to your additional libs folder
3. resourse.zip - extract and copy the folder and its contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
4. OtherLibFiles.zip - extract them and copy them to your additional libs folder.
5. DemoRes.zip and LibRes.zip - extract and copy the folders and thier contents to be on the same folder level as that of the B4A project's /Files and /Objects folders.
6. You will need a most recent version of android-support-v4.jar in you additional libs folder
7. The Java code
8. PersianCalendarViewLibFiles.zip - extract and copy the jar and xml to your additional library folder.
9.fonts.zip - extract the folder and copy the folder and its contents to be a subfolder of the B4A /Files folder

Note:
a. Using B4A version 6.50.
b. AppCompat should be enabled (it should show as V6.50 with the .aar file that is included))

You should get this:

View attachment 55471

How to change/amend it and what it is saying (and if correct) - I leave that up to you...

Click on a date and fling it left / right. See the toast messages (no idea what they are saying).
how show number days month in the my view(example array af Lables)?
 
Top