[android-developers] SeekBarPreference ClassCastException why?

2010-05-27 Thread Jeruliu
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:


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"
  >



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

"http://groups.google.com/group/android-developers?hl=en


[android-developers] SeekBarPreference ClassCastException why?

2010-05-27 Thread Jeruliu
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:


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"
  >



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
"http://groups.google.com/group/android-developers?hl=en