A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java Micro Edition
Choice Group fit policy
Joined: Mar 08, 2007
May 29, 2011 04:12:01
I am using the following code:
choiceGroup = new ChoiceGroup(null, ChoiceGroup.EXCLUSIVE); choiceGroup.append("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", null); choiceGroup.append("asdasdasd", null); choiceGroup.setFitPolicy(Choice.TEXT_WRAP_ON); form.append(choiceGroup); Display.getDisplay(this).setCurrent(form);
The first choice appears like this on my mobile:
So that the whole content does not appear! Why is that? I have used the fit policy to make it wrap but it's not! What must I do?
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Walter Gabrielsen Iii
Joined: Apr 09, 2011
May 29, 2011 11:39:45
I ran your code through the Java ME SDK 3.0, and it wrapped in the emulator but it took three lines.
The Implementation may limit the maximum number of lines that it will actually present.
Perhaps your phone scrolls the text in ChoiceGroup horizontally when it is selected instead of wrapping it? It may be hard to tell with the characters all being "a."
I agree. Here's the link:
subject: Choice Group fit policy
ChoiceGroup getSelectedIndex() returns -1
How to add list to a form
ItemStateListener & Interaction between two choicegroups
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014