Search code examples
javaandroidandroid-holo-everywhere

HoloEverywhere SeekBar ClassCastException


I am using the SeekBar class provided by HoloEverywhere. I have the following imports:

import org.holoeverywhere.widget.SeekBar;
import org.holoeverywhere.widget.SeekBar.OnSeekBarChangeListener;

I get no preliminary errors or warnings, but when I compile, I get a class cast exception on the following line:

sectionTimeElapsedSeekBar = (SeekBar) findViewById(R.id.sectionTimeElapsedSeekBar);

Here is the corresponding 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" />

Anyone have any ideas?


Solution

  • Change to:

    <org.holoeverywhere.widget.SeekBar
            android:id="@+id/sectionTimeElapsedSeekBar"
            ...
            />