有人知道我为什么得到这个(见图)?android - seekbar进度没有得到一路
这是我如何设置:
this._seekBar.setProgressDrawable(_context.getResources().getDrawable(R.drawable.common_controls_player_progressbar_bg_expanded));
this._seekBar.setThumb(_context.getResources().getDrawable(R.drawable.ringtone_scrub));
this._seekBar.setThumbOffset(0);
this._seekBar.setMax(1000);
this._seekBar.setMinimumHeight(6);
搜索栏本身:
<SeekBar android:id="@+id/seekbar_ctrl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxHeight="6dp"/>
展开视图XML
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="@color/player_progressbar_gray"/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<solid android:color="@color/player_progressbar_gray"/>
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="@color/player_progressbar_green"/>
</shape>
</clip>
</item>
</layer-list>
它确实发生在这两个展开和折叠视图。我错过了什么?
预先感谢您
应该是什么样子? – 2011-05-17 21:26:58
它假设被涂成绿色(与擦洗颜色相同)直到擦洗位置。但它不这样做。 seekbar由控件(ImageView)触发,所以点击它所做的就是显示进度条。因此,如果我的价值是50%,它应该将进度提高到50%,但是直到我真正开始负责进度(控制者)的控制时才会这样做。一旦玩家开始工作,它再次绘制。但在暂停模式下,当我看着seekbar时,它看起来像上面那样。 – dropsOfJupiter 2011-05-18 00:39:33