开发者

android seekbar drawing problem on orientation change

when the orientation changes, the seekbar drawing is messed up. See voice call and开发者_如何学C alarm below:

android seekbar drawing problem on orientation change


I think I figured it out. SeekBar.setSaveEnabled(false) seems to fix this.


I was having this issue myself, and saveEnabled="false" did not fix it. My problem was that I was calling setMax after setProgress:

mSeekBar = (SeekBar) findViewById(R.id.seekBarMediaDC);
mSeekBar.setProgress((int) currentItem.volumeDC);
mSeekBar.setMax(10);

And changing it to this fixed it:

mSeekBar = (SeekBar) findViewById(R.id.seekBarMediaDC);
mSeekBar.setMax(10);
mSeekBar.setProgress((int) currentItem.volumeDC);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜