Try inflating with parent as null.
On Mon, Nov 8, 2010 at 3:34 AM, Kostya Vasilyev <[email protected]> wrote:
> There should be a more detailed stack trace in logcat.
>
> Other than that, what is "title", and what is its relation to "convertView"
> ?
>
> -- Kostya
>
> 08.11.2010 0:57, Hendrik Greving пишет:
>
> I am implementing a ListAdapter and in getView, I am returning
>
> @Override
> *public* View getView(*int* position, View convertView, ViewGroup parent)
> {
> * switch* (position) {
> * case* 0:
> * if* (title == *null*) {
> title = View.*inflate*(mContext, R.layout.*main_settings_title
> *, parent);
> }
> * return* title;
> }
> * return* *null*;
> }
>
> inflate is throwing a UnsupportedOperationException
>
> The resource is posted below. What am I doing wrong?
>
> <?xml version=*"1.0"* encoding=*"utf-8"*?>
> <LinearLayout
> xmlns:android=*"http://schemas.android.com/apk/res/android"<http://schemas.android.com/apk/res/android>
> *
> android:layout_width=*"fill_parent"*
> android:layout_height=*"fill_parent"*>
> <TextView android:id=*"@+id/menutitle"*
> android:layout_width=*"fill_parent"*
> android:layout_height=*"wrap_content"*
> android:background=*"#444444"*
> android:gravity=*"center_horizontal|top"*
> android:text=*"Settings"*
> android:textColor=*"#eeeeee"*
> android:textStyle=*"bold"*
> android:shadowColor=*"#000000"*
> android:shadowRadius=*"3."*
> android:shadowDx=*"3.0"*
> android:shadowDy=*"3.0"*
> android:textSize=*"7pt"*
> android:paddingBottom=*"20dip"*
> android:paddingTop=*"20dip"*/>
> </LinearLayout>
> --
> 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
>
>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --
> http://kmansoft.wordpress.com
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
--
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