0
當用戶將鼠標懸停在編輯區域下方的觸摸屏鍵盤不顯示時。顯示的是與鍵盤大小相同的白色區域。這是BlackBerry Torch上的一個問題。我希望觸摸屏鍵盤能夠使用下面的代碼正確顯示?觸摸屏鍵盤顯示不正確
BasicEditField nameField =
new BasicEditField(
" "+Local.getInfo8()+ " : ", "", 100, BasicEditField.FILTER_DEFAULT)
{
private int iRectX = getFont().getAdvance(getLabel());
private int iRectWidth = backgroundButtonBitmap.getWidth() - iRectX - 4;
public int getPreferredHeight() {
return backgroundButtonBitmap.getHeight()/2;
}
public void layout(int width, int height) {
//setExtent(width, getPreferredHeight());
super.layout(width, getPreferredHeight());
}
public void paint(Graphics g) {
g.setColor(Color.BLACK);
g.setBackgroundColor(Color.WHITE);
//g.drawRect(iRectX, 0, iRectWidth, 20);
super.paint(g);
}
};