XtraViews

LucaMs

Expert
Licensed User
Longtime User
Your library and your threads are excellent!

Since you have been very generous sharing these, I take this opportunity: (this part does not make it a good idea: I mean that "I take advantage brazenly", I hope that this is the right translation :D)

Could you take a look at this post?


Thank you and again congratulations for your library and work
 

iz0ndg

Active Member
Licensed User
Longtime User
First all, Thank you Periklis for your great work !!

The tutorial source go to error in part 6 (customizing the system dialog) onto Motorola Xoom2(Xyboard) Android Version 4.0.4
** 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)

The Code:

B4X:
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

It would seem to be handling background, any idea ?
 

little3399

Active Member
Licensed User
Longtime User
HI, I get a error when I runing the sample4 on Android 2.3.X ....

upload_2014-11-15_7-9-54.png
 

Attachments

  • upload_2014-11-15_7-10-31.png
    upload_2014-11-15_7-10-31.png
    97.8 KB · Views: 223

b4a123

New Member
Licensed User
Longtime User
thanks for your libs!
how can set a modal dialog with DialogView ? in "BetterDialog" library, the CanceledOnTouchOutside property can set it, and "BetterDialog" can set back_key event, so it can set a modal dialog, but with your dialogview, i don't know how to do it. i like your dialogview.

Thanks very much!
 
Last edited:

u2005k

Member
Licensed User
Longtime User
Hi,
Chrome as well as Firefox blocking download of this library (I am using dropbox link). Please see attached screenshots. Is there any other place from where I can download it?

Thanks & regards...
Uday
xtraviews error firefox.png
xtraviews error.png
 

LucaMs

Expert
Licensed User
Longtime User
I had the same problem (with Firefox).

Unfortunately I do not remember how, but I was able to download it, by setting some consensus in the browser.

Now I tried again and, "unfortunately", I do not get more that problem.

You will be able to find that setting.
It is not an option, you should see it when you try to download.
 

welu1805

Active Member
Licensed User
Longtime User
Hi all,

I also use DialogView. It's very useful for me. But I have a problem: When I try to set the title textsize with

Dialog.Options.Elements.Title.Set(Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD_ITALIC), Colors.Blue, 25, Gravity.CENTER, TitleBackground, Colors.Red)

it doesn't work. The DividerColor is red, but the properties of the title are not assigned.
 

SternFaun

Member
Licensed User
How can I play a gif until the last frame? I tried "Do ultil MovieView.Frame = "Last Frame" but this didnt work!?
 
Top