Hi All,

I'm suffering from this for a week, i was trying to use the famous
SeekBarPreference in a dialog - 
http://android.hlidskialf.com/blog/code/android-seekbar-preference

I copied the class from above link into my project.
Then created the xml as brightness.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
              android:id="@+id/layout_root"
              android:orientation="horizontal"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:padding="10dp"
              >
        <com.yoomap.anymode.SeekBarPreference
                android:key="brightness"
        android:title="Brightness"
        android:summary="Adjust your android Brightness"
        android:dialogMessage="Brightness"
        android:defaultValue="120"
        android:text=""
        android:max="255"
        />
</LinearLayout>

Finally I try to integrate it as custom dialog:
Dialog dialog = new Dialog(mContext);

dialog.setContentView(R.layout.brightness);
dialog.setTitle("Custom Dialog");
dialog.show();

But always getting error: "Error inflating class
java.lang.reflect.Constructor" at this line
"<com.yoomap.anymode.SeekBarPreference" in the xml

Root cause: ClassCastException on SeekBarPreference

Can anyone point out why? thanks a million!!!!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to