Device:Android KitKat 4.4.2

hi,
i have something like this class for callback native interface
package com.mycompany;
public class NativeCallback {

    public static void callback() {
        // do stuff
    }

}

and need to show as this Dialog in my static method, without crash my app
*Dialog.show("Title", "body", "Ok", null);*



note: i try to write like this 
 package com.mycompany;
 ///...
public class NativeCallback {
public static void callback() {
           Dialog dlg = new Dialog("At Bottom");
           dlg.setLayout(new BorderLayout());
           dlg.add(new SpanLabel("Dialog Body text", "DialogBody"));
           int h = Display.getInstance().getDisplayHeight();
           dlg.setDisposeWhenPointerOutOfBounds(true);
           dlg.show(h /8 * 7, 0, 0, 0);
    }
}


but that does not work and led to crash my app
*how i can do it?*

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/52b8ab7b-8eed-4b3f-aa18-15bb7c4cfb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to