i have 5 bitmap in horizontalField , when i click on bitmap then bitmap it shows exception
manager. replace :newField already has a manager
i’m using this code:
hfm = new HorizontalFieldManager(Field.FIELD_HCENTER|Field.FIELD_VCENTER);
bitmapField1 = new BitmapField(mImgTable , BitmapField.FOCUSABLE) {
protected boolean navigationClick(int status, int time )
{ try{
//Dialog.alert("image changed");
hfm.replace(bitmapField1, bitmapField6);
hfm.replace(bitmapField2, bitmapField);
hfm.replace(bitmapField3, bitmapField);
hfm.replace(bitmapField4, bitmapField);
hfm.replace(bitmapField5, bitmapField);
}catch(Exception e){
Dialog.alert("choose only one"+e);
}
return true;
}
};
hfm.add( bitmapField1);
From description of replace method:
Here you are substituting bitmapField to other ones more than once to the same Manager: