我使用HoloEverywhere提供的SeekBar類。我有以下的進口:HoloEverywhere SeekBar ClassCastException
import org.holoeverywhere.widget.SeekBar;
import org.holoeverywhere.widget.SeekBar.OnSeekBarChangeListener;
我沒有得到任何初步錯誤或警告,但是當我編譯,我得到以下行一類轉換異常:
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" />
任何人有任何想法?
如果您以這種方式導入,您是不是使用默認的SeekBar而不是使用holoeverywhere SeekBar? –