使用HoloEverywhere的SeekBar,如下:
import org.holoeverywhere.widget.SeekBar;
import org.holoeverywhere.widget.SeekBar.OnSeekBarChangeListener;
最开始运行正常,到了编译的时候,在下面这行报出ClassCastException异常:
sectionTimeElapsedSeekBar = (SeekBar) findViewById(R.id.sectionTimeElapsedSeekBar);
下面的是相应的XML文件:
<SeekBar
android:id="@+id/sectionTimeElapsedSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/startOrPauseTimerButton"
android:layout_alignParentLeft="true"
android:layout_marginBottom="16dp"
android:max="2100" />