Hello.

I have very strange issue with getView -method in custom implementation of 
the adapter view - convertView argument doesn't return a proper view. From 
time to time it works well and I'm able to grab, for instance, ImageView 
with findviewbyid -method, but sometimes it returns a wrong view and when 
I'm trying to grab an ImageView it findviewbyid retunrs null. Is it a kind 
of library bug or something is really wrong with my code bellow? Thank you 
in advance for answers.

        @Override
public View getView(int position, View convertView, ViewGroup parent)
{
View view = convertView;
 if(view == null)
{
LayoutInflater inflater = 
(LayoutInflater)this.context.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
 view = inflater.inflate(R.layout.news_headlines_left, null);
        
}
               ImageView imgView = 
(ImageView)view.findViewById(R.id.newsPhotoLeft);
                      .
                      .
                      .
}

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