If you want to access a custom view in some layout.xml file, you have two options:
- The view has its own class. Then you do
<package.name.MyView android:layout_width= ... /> - A view is an inner class:
<view class="package.name.OuterClass$MyView" android:layout_width= ... />
Now I want to do the same inside the <PreferenceScreen> . The first method works well, but I would like to put all the custom Preference classes in my PreferenceActivity. I tried <Preference class="package.name.OuterClass$MyPreference" ... /> (also with '.' Instead of '$') as well as <package.name.OuterClass.MyPreference ... /> , but both failed.
Does anyone have any ideas?
android inner-classes android-xml preferencescreen
m1ntf4n Aug 30 '11 at 19:56 2011-08-30 19:56
source share