更新时间:2023-01-26 12:42:49
我遇到了同样的问题,最后发现了.
I was having the same problem, and finally found out.
您必须为 knobBefore 属性设置样式才能实现所需的功能. 试试这个:
You have to set a style for the knobBefore attribute to achieve what you want. Try this:
barStyle = new ProgressBarStyle(skin.newDrawable("white", Color.DARK_GRAY), textureBar);
barStyle.knobBefore = barStyle.knob;
bar = new ProgressBar(0, 10, 0.5f, false, barStyle);
希望这会有所帮助!