我是黑莓开发的新手。我希望在我的项目中屏幕底部有一个自定义标签栏,用于黑莓应用程序,与下面给出的图像相同。我尝试了黑莓手机提供的示例代码。
但是现在我想使用自定义用户界面。我在Google上搜索过它,并且没有获得有关自定义字段的任何有效信息。请告诉我如何在黑莓手机上做到这一点。
以前是否有人这样做过?
请回复任何链接/代码/摘要。
答案 0 :(得分:1)
试试这段代码 -
EncodedImage e2 = EncodedImage.getEncodedImageResource("map.png");
EncodedImage e3 = EncodedImage.getEncodedImageResource("members.png");
EncodedImage e4 = EncodedImage.getEncodedImageResource("message.png");
EncodedImage e5 = EncodedImage.getEncodedImageResource("settings.png");
EncodedImage e6 = EncodedImage.getEncodedImageResource("logout.png");
EyelidFieldManager manager = new EyelidFieldManager();
HorizontalFieldManager buttonPanel = new HorizontalFieldManager(Field.FIELD_TOP | Field.USE_ALL_WIDTH);
VerticalFieldManager vfm=new VerticalFieldManager();
vfm.add(new BitmapField(e2.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
Dialog.alert("MAP");
return true;
}
});
buttonPanel.add(vfm);
buttonPanel.add(new LabelField(" "));
VerticalFieldManager vfm1=new VerticalFieldManager();
vfm1.add(new BitmapField(e3.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
Dialog.alert("Members");
return true;
}
});
buttonPanel.add(vfm1);
VerticalFieldManager vfm2=new VerticalFieldManager();
vfm2.add(new BitmapField(e4.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
Dialog.alert("Message");
return true;
}
});
buttonPanel.add(vfm2);
VerticalFieldManager vfm3=new VerticalFieldManager();
vfm3.add(new BitmapField(e5.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
Dialog.alert("Settings");
return true;
}
});
buttonPanel.add(vfm3);
VerticalFieldManager vfm4=new VerticalFieldManager();
vfm4.add(new BitmapField(e6.getBitmap(),FOCUSABLE){
protected boolean navigationClick(int status, int time){
Dialog.alert("Logout");
return true;
}
});
buttonPanel.add(vfm4);
manager.add(buttonPanel);
setTitle(manager);
答案 1 :(得分:0)
示例:
public class MyApp extends UiApplication{
public MyApp(){
pushScreen(new LoadingScreen());
} }