Slider doesn't show progress in Simulator

80 views
Skip to first unread message

j.b.p.t...@googlemail.com

unread,
Sep 20, 2014, 5:48:22 AM9/20/14
to codenameone...@googlegroups.com
Hej,

my problem is: The Slider doesn't show the progess with Graphics (only Text).

I have a Form with a Slider (editiable, PercentageOnTop), that was created with the GUI-Builder. When I use the Form-Simulator of the GUI-Builder, the Slider shows the progress (Graphic) and the correct percentage (Text). But when I start the Device-Simulator only the Percentage (Text) is shown correct. There is no graphically progess visible. I created both themes Slider and SliderFull.

How can I solve this problem? What am I doing wrong?

The same problem occurs, when I manually create a form and add a slider:
Form form = new Form();
form
.setLayout(new FlowLayout());

Slider slider = new Slider();
slider
.setEditable(true);
slider
.setRenderPercentageOnTop(true);
slider
.setMinValue(0);
slider
.setMaxValue(100);
slider
.setProgress(0);

form
.addComponent(slider);
form
.repaint();
form
.revalidate();
form
.show();

Many thanks in advance.

Jacob

IDE: Eclipse
OSX 10.9.4 and Windows 8
Simulator (Android, iOS, ...)

Shai Almog

unread,
Sep 20, 2014, 12:44:26 PM9/20/14
to codenameone...@googlegroups.com, j.b.p.t...@googlemail.com
Hi,
did you create both styles in selected and unselected states?
How did you style the slider full UIID? What did you define there?

FYI there is no need to repaint/revalidate since form does those implicitly.

j.b.p.t...@googlemail.com

unread,
Sep 23, 2014, 2:05:26 PM9/23/14
to codenameone...@googlegroups.com
Hej,

thanks for your answer. I created both styles. Both styles use a new 3-image border (See attached images: SliderTheme.png and SliderFullTheme.png) and the foreground color was changed to black. I didn't change more. Also I attached two images: the fist shows what the GUI-Builder simulates me (GUI-FormSimulator.png). There the slider works. Second, an image that shows the device simulator started with Eclipse (DeviceSimulator.png). The Progress is shown as percent but not visually.

My Eclipse version is Luna (up2date) and the project uses java jdk 1.5. CN1 is also updated.
DeviceSimulator.png
GUI-FormSimulator.png
SliderFullTheme.png
SliderTheme.png

Shai Almog

unread,
Sep 23, 2014, 10:29:29 PM9/23/14
to codenameone...@googlegroups.com, j.b.p.t...@googlemail.com
Hi,
it seems there was a regression with slider. It might exist in the new version of the simulator/designer tool now but should be fixed for device builds.

jensant...@gmail.com

unread,
Nov 3, 2014, 5:36:09 AM11/3/14
to codenameone...@googlegroups.com, j.b.p.t...@googlemail.com
Hi,

I think I've got the same problem.

I had not even edited anything. Just add a slider by the Codename One Designer. Nothing is shown on the simulator. Also tried that on device builds, but the same problem occurs.

Tried to put a background on it by adding the Slider and SliderFull styles in unselected and selected. But I can only see the background only. It seems that the whole component becomes invisible.

By switching back to older versions of cn1, it displays normally.

Regards,

Jensan


IDE: Intellij IDEA
Windows XP
Simulator (Android, iOS)




Shai Almog於 2014年9月24日星期三UTC+8上午10時29分29秒寫道:

Shai Almog

unread,
Nov 3, 2014, 9:01:53 AM11/3/14
to codenameone...@googlegroups.com, j.b.p.t...@googlemail.com, jensant...@gmail.com
Hi,
if so then it will be fixed in the next update for the library.
Reply all
Reply to author
Forward
0 new messages