public View getView(int position, View convertView, ViewGroup parent)
{
...
Drawable d = getResources().getDrawable(R.drawable.icon);
ImageView iv = (ImageView) findViewById(R.id.icon);
iv.setImageDrawable(d)   // will throw java.lang.NullPointerExcepiton
...
return convertView
}

the icon is a 9 patch png
every time run it, will throw java.lang.NullPointerExcepiton

if use a normal png, work fine, and the 9 patch png is from android
demo source, so it is right

Who knows, thank you

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