hi In Blackberry habe ich ein horizontales Feld managar erstellt und einige Schaltflächen kleiner Größe hinzugefügt, um Symbolleiste am unteren Rand des Bildschirms anzuzeigen.Aber mein Problem ist dort ist zu viel Abstand zwischen den 2 Knöpfen. Ich muss diesen Abstand zwischen 2 Knöpfen verringern, damit ich es schaffen kann, atleast 6 Knöpfe am unteren Rand des Schirmes zu setzen. Ich verwende die BFmsg.setMargin (305,0,0,40) Aussage . Kann mir bitte jemand dabei helfen.BlackBerry: Reduzieren Sie den Abstand zwischen 2 Tasten in HorizontalFieldManager
Im Anschluss ist mein Code:
BFcontacts = new ButtonField("Cnt")
{
protected void paint(Graphics graphics)
{
//Bitmap contactsbitmap = Bitmap.getBitmapResource("contacts.jpg");
//graphics.drawBitmap(0, 0, contactsbitmap.getWidth(), contactsbitmap.getHeight(), contactsbitmap, 0, 0);
graphics.setColor(Color.WHITE);
graphics.drawText("Cnt",0,0);
}
};
BFcontacts.setMargin(305,0,0,10);//vertical pos,0,0,horizontal pos
HFM.add(BFcontacts);
BFmsg = new ButtonField("Msgs")
{
protected void paint(Graphics graphics)
{
//Bitmap msgsbitmap = Bitmap.getBitmapResource("messages.jpg");
//graphics.drawBitmap(0, 0, msgsbitmap.getWidth(), msgsbitmap.getHeight(), msgsbitmap, 0, 0);
graphics.setColor(Color.WHITE);
graphics.drawText("Msgs",0,0);
}
};
BFmsg.setMargin(305,0,0,40);//vertical pos,0,0,horizontal pos : original
HFM.add(BFmsg);
add(HFM)
Vielen Dank im Voraus