GridFieldManager grid;
grid = new GridFieldManager(2,2,0);
EncodedImage e1 = EncodedImage.getEncodedImageResource("image1.png");
EncodedImage e2 = EncodedImage.getEncodedImageResource("image2.png");
EncodedImage e3 = EncodedImage.getEncodedImageResource("image3.png");
EncodedImage e4 = EncodedImage.getEncodedImageResource("image4.png");
grid.add(new BitmapField(e1.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
//your code
return true;
}
});
grid.add(new BitmapField(e2.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
//your code
return true;
}
});
grid.add(new BitmapField(e3.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
//your code
return true;
}
});
grid.add(new BitmapField(e4.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
//your code
return true;
}
});
add(grid);