NativeDialogs
NativeDialogs copied to clipboard
NativePickerDialog not displaying
Hi,
First of all thanks for your great work on these extensions.
I am trying to use the NativePickerDialog but nothing is displaying when i call the show() method. I'm successfully using the Toast and Progress classes though.
- AIR 3.9
- LG-P970
- Andriod 2.2.2.
adb logcat:
D/[NativeDialogs]( 3256): Extension.createContext extId: PickerDialogContext
D/PickerDialogContext( 3256): Registering Extension Functions
I/dalvikvm( 3256): Could not find method android.app.AlertDialog$Builder.<init>,
referenced from method pl.mateuszmackowiak.nativeANE.functoins.NativePickerDial
ogContext$PickerDialog.<init>
W/dalvikvm( 3256): VFY: unable to resolve direct method 192: Landroid/app/AlertD
ialog$Builder;.<init> (Landroid/content/Context;I)V
D/dalvikvm( 3256): VFY: replacing opcode 0x70 at 0x0006
D/dalvikvm( 3256): VFY: dead code 0x0009-001b in Lpl/mateuszmackowiak/nativeANE/
functoins/NativePickerDialogContext$PickerDialog;.<init> (Lpl/mateuszmackowiak/n
ativeANE/functoins/NativePickerDialogContext;Lcom/adobe/fre/FREContext;Landroid/
content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/adobe/fre/FREArray;[I[D
I)V
My code:
public function show():void
{
const hours:PickerList = new PickerList(["1","2","3"], 1);
const minutes:PickerList = new PickerList(["1", "2", "3"], 1);
_picker = new NativePickerDialog();
//_picker.title = "Select this!";
//_picker.buttons
_picker.dataProvider = Vector.<PickerList>([hours, minutes]);
_picker.show(false);
Toast.show(NativePickerDialog.isSupported.toString());
}
I've got a same problem with NativePickerDialog dialog on HTC desire HD! it uses android version 2.3.5. AIR 14.0.
my code :
picker = new NativePickerDialog();
var selIndex : int = getSelectedLangIndex();
var pickerlist1 : PickerList = new PickerList(langs_arr,selIndex);
pickerlist1.width = contentWid;
pickerlist1.labelFunction = labelFunt;
picker.dataProvider = Vector.<PickerList>([pickerlist1]);
picker.addEventListener(NativeDialogEvent.CLOSED,getSelectedLanguage);
picker.show();
but nothing shows when I call : picker.show();
adt logcat says : D/NativeDialogs: Extension.createContext extId: PickerDialogContext D/PickerDialogContext(15954): Registering Extension Functions
Is NativePickerDialog not compatible with android < 2.5 ?