Thraka, to see the ALL exceptions you need to turn the 'filter' off in the Logs window/tab
** Activity (main) Pause, UserClosed = false **
** Activity (part6) Create, isFirst = true **
** Activity (part6) Resume **
java.lang.NoSuchMethodError: android.view.View.setBackground
at com.datasteam.b4a.xtraviews.DialogView.setupLinearTextView(DialogView.java:197)
at com.datasteam.b4a.xtraviews.DialogView.setupTitle(DialogView.java:212)
at com.datasteam.b4a.xtraviews.DialogView.access$7(DialogView.java:204)
at com.datasteam.b4a.xtraviews.DialogView$3.onShow(DialogView.java:338)
at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1245)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.datasteam.b4a.xtraviews.imports.Msgbox.waitForMessage(Msgbox.java:175)
at com.datasteam.b4a.xtraviews.imports.Msgbox.msgbox(Msgbox.java:119)
at com.datasteam.b4a.xtraviews.DialogView.show(DialogView.java:355)
at com.datasteam.b4a.xtraviews.DialogView.MsgBox(DialogView.java:385)
at com.datasteam.b4a.xtraviews.dialogview.tutorial.part6._customizeandshowdialog(part6.java:391)
at com.datasteam.b4a.xtraviews.dialogview.tutorial.part6._btndialog_click(part6.java:327)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:163)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
at android.view.View.performClick(View.java:3526)
at android.view.View$PerformClick.run(View.java:14149)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4697)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
Sub CustomizeAndShowDialog (UseCustomContent As Boolean)
'Configure the dialog title
Dim TitleBackground As ColorDrawable : TitleBackground.Initialize(Colors.Gray, 0)
Dialog.Options.Elements.Title.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD_ITALIC), Colors.Blue, 25, Gravity.CENTER, TitleBackground, Colors.Red)
'Configure the message
Dim MessageBackground As ColorDrawable : MessageBackground.Initialize(Colors.Magenta, 0)
Dialog.Options.Elements.Message.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD_ITALIC), Colors.Blue, 25, Gravity.CENTER, MessageBackground)
'Configure the dialog buttons
Dim ButtonBackground As StateListDrawable : ButtonBackground.Initialize
Dim ButtonBackgroundNormal As ColorDrawable : ButtonBackgroundNormal.Initialize(Colors.Yellow, 0)
Dim ButtonBackgroundPressed As ColorDrawable : ButtonBackgroundPressed.Initialize(Colors.Cyan, 0)
ButtonBackground.AddState(ButtonBackground.State_Pressed, ButtonBackgroundPressed)
ButtonBackground.AddCatchAllState(ButtonBackgroundNormal)
Dim ButtonStyle1, ButtonStyle2, ButtonStyle3 As DialogViewButtonStyle
ButtonStyle1.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_NORMAL), Colors.Blue, 14, Gravity.LEFT + Gravity.BOTTOM, ButtonBackground)
ButtonStyle2.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD), Colors.Red, 14, Gravity.LEFT + Gravity.Top, ButtonBackground)
ButtonStyle3.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD_ITALIC), Colors.Black, 24, Gravity.CENTER, ButtonBackground)
'Dialog.Options.Buttons.Default.Style = ButtonStyle1 <= apply the style to all buttons
Dialog.Options.Elements.Buttons.Positive.Style = ButtonStyle1
Dialog.Options.Elements.Buttons.Neutral.Style = ButtonStyle2
Dialog.Options.Elements.Buttons.Negative.Style = ButtonStyle3
'Or set the style in one line!
'Dialog.Options.Elements.Buttons.Default.Style.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_NORMAL), Colors.Blue, 14, Gravity.LEFT + Gravity.BOTTOM, ButtonBackground)
If UseCustomContent Then
Dialog.LoadLayout("dialog6").Show("Title", "yes", "no", "cancel", LoadBitmap(File.DirAssets, "icon1.png"))
Else
Dialog.Msgbox("title", "message", "yes", "no", "cancel", LoadBitmap(File.DirAssets, "icon1.png"))
End If
End Sub