Its just missing styles under the default Windows Phone theme. Just define the style SliderFull & Slider for both selected/unselected states. We fixed this for the next update.
Slider doesn't draw (CodeName One) with Windows phone skin
-
19-10-2022 - |
Frage
I am trying to create a slider in codename one, but for some reason the slider isn't drawn, other components however, are. The code I have so far
public void start()
{
if (current != null)
{
current.show();
return;
}
mainForm = new Form("Slider and buttons");
c = mainForm.getContentPane();
c.setLayout(new FlowLayout());
Slider jSlider = new Slider();
jSlider.setMaxValue(360);
jSlider.setMinValue(0);
jSlider.setProgress(50);
jSlider.setEditable(true);
jSlider.setPreferredSize(new Dimension(300,50));
c.addComponent(jSlider);
c.repaint();
c.invalidate();
c.revalidate();
mainForm.show();
}
I'm not sure what I could have forgotten, probably just overlooking something..
Thanks in advance
EDIT: It actually does draw the slider if I choose the iPhone skin, but it doesn't do so under "lumia", anyone know why that is?
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow