9宫格高亮显示,UI界面问题,请高手指教!~炮炮快来
NOKIA的9宫格模式怎么实现?思路是什么?选者后高亮?
我自己是用自定义类做
但老是往下排列,不能行排,是不是跟布局设置有关?
public static class xx extends CustomItem
{
private static final int INDENT_MARGIN = 8;
private int indent;
private String text;
private Image img;
private static OutlineItem traversingItem;
//构造函数
public OutlineItem( int inIndent, String inText )
{
super( null );
indent = inIndent;
text = inText;
try{
img=Image.createImage( "/read.png ");
}catch(Exception e){}
setLayout( LAYOUT_2 | LAYOUT_LEFT | LAYOUT_TOP |
LAYOUT_EXPAND | LAYOUT_NEWLINE_AFTER );//???上这里布局的问题吗?
}
public int getMinContentHeight()
{
return FONT_HEIGHT;
}
public int getMinContentWidth()
{
return indent * INDENT_MARGIN + FONT_HEIGHT;
// we might not have text to calculate font width