Hi all,

I created a ListActivity and I used an ArrayAdapter class that I
extended to display the rows of my list (with an icon and text).
Everything there works great. I need a few of these lists on different
tabs, so I decided to create a base class called ListBase that extends
from ListActivity. I changed my class to extend my new ListBase
instead of ListActivity. Again everthing worked.

The last step for me is moving my private adapter class into the base
class. For some reason, when I move it into the base class, the

@Override
public View getView(int position, View convertView, ViewGroup parent)
{...}

never gets called. Remember that the above method is inside of the
private ArrayAdapter class which is inside my ListBase class. It works
fine when I put the private adapter class in the child class that
inherits from ListBase, but the override doesnt get called if I move
it into ListBase. I tried making the private class a public class and
that didnt work either.

Is there some rule in android/java about overrides and private
classes? How can I get it to work?

Here is what works:

public class LatestNewsView extends ListBase {
    ...
   private class StoryAdapter extends ArrayAdapter<Story> {
            ...
        @Override
        public View getView(int position, View convertView,
ViewGroup    parent)   {
                    // this code gets called properly
        }

   }


Here is what doesnt work:

public abstract class ListBase extends ListActivity {
   ...
   private class StoryAdapter extends ArrayAdapter<Story> {
      ...
      @Override
      public View getView(int position, View convertView, ViewGroup
parent) {
        //this never fires WHY???
      }

Any help would be great!!

Thanks,
-Savij

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