黑莓的网格场 [英] Grid Field in Black Berry

查看:60
本文介绍了黑莓的网格场的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好每个人都是BlackBerry新手,我是Android开发人员。



知道我想用java创建BlackBerry Application。



- 我想创建带有图像和文本的网格字段我不知道如何创建我在BlackBerry文档中看到了一些基本级别的网格字段,但它不是我需要的完美的网格字段告诉我任何一个,



*如何使用图像和文本创建网格字段?

*如何创建自定义网格字段和事件处理对于每件商品?



提前付款,



问候。



Murali。

Hi Every one am newbie to BlackBerry, I was an Android Developer.

Know I would like to create BlackBerry Application using java.

- I want to create Grid Field with image and text I don''t know how o create I seen some basic level Grid Field in BlackBerry docs, but its not perfect one that I need please tell me any one,

* How to create Grid Field with Image & text?
* How to create custom grid Field and event handling for each item?

Thanks a ton in advance,

regards.

Murali.

推荐答案

GridFieldManager grid = new GridFieldManager(4 ,4 , 0);
Bitmap msg = Bitmap.getBitmapResource("msg.png");
BitmapField message = new BitmapField(msg, Field.FOCUSABLE)
{
    protected boolean navigationClick(int status,int time)
    {
       label.setText("Messages");
       Dialog.alert("Message icon selected");
       return true;
    }
};
message.setBorder(border);
Bitmap logs = Bitmap.getBitmapResource("calllogs.png");
BitmapField call_logs = new BitmapField(logs, Field.FOCUSABLE)
{
    protected boolean navigationClick(int status,int time)
    {
      label.setText("Call logs");
      Dialog.alert("Call Logs icon selected");
      return true;
    }
};
call_logs.setBorder(border);
grid.add(message, 0);
grid.add(call_logs, 1);
grid.add(contacts, 2);
grid.add(internet, 3);
grid.add(calendar, 4);
grid.setColumnPadding(13);
grid.setRowPadding(13);
add(grid);
message.setFocusListener(this);
call_logs.setFocusListener(this);



如果您使用的图像可以使用其他你可以使用labelfield

尝试使用它,你也可以设置它的重点..


if you are using images you can use this else you can use labelfield
Try using this and You can also set focus on it..


这篇关于黑莓的网格场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆