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

Reply via email to