Android Question Getting abnormal error while running code

AndroidMadhu

Active Member
Licensed User
Hello,
I am getting the below error while I am click on the lbldate.
The below is the error :
B4X:
** Activity (actincome) Resume **
Sleep not resumed (context is paused): b4a.example3.customlistview$ResumableSub_PanelClickHandler
java.lang.RuntimeException: Font asset not found fonts/Roboto-Medium.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:847)
at com.wdullaer.materialdatetimepicker.TypefaceHelper.get(TypefaceHelper.java:31)
at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:338)
at android.app.Fragment.performCreateView(Fragment.java:2522)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)
at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)
at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:738)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6820)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:922)
* Service (starter) Create *
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **

The below is the code :
B4X:
#Region   Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim date As DatePickerDialog
Private lblDate As Label
Private clvIncomeHistory As CustomListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Income")
date.Initialize("Date",DateTime.GetYear(DateTime.Now),DateTime.GetMonth(DateTime.Now)-1,DateTime.GetDayOfMonth(DateTime.Now))
Dim cal As Calendar
cal.Initialize("dd.mm.yyyy",cal.ENGLISH,DateTime.Date(DateTime.Now))

date.MinDate = cal


Dim dt As String
DateTime.DateFormat = "dd-MM-yyyy"'"dd MMM yyyy"
dt = DateTime.Date(DateTime.Now)
lblDate.Text=dt
End Sub

Sub lblDate_Click
date.show("Test")
End Sub

I have never used the font "fonts/Roboto-Medium.ttf" anywhere at the program.

Please advice

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top