Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:27:47+00:00 2026-06-02T02:27:47+00:00

I’m writing an app the gets information off an RSS feed, parses it using

  • 0

I’m writing an app the gets information off an RSS feed, parses it using the DOM parser (issues with the clients RSS feed) and then shows the parsed objects in a ListView.

For some reason, the getView() is not being called…

here is the code for the Activity:

public class NoPicList extends Activity {
    ListView list;
    NoPicAdapterV2 adapter2;
    ProgressDialog mDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.no_pic_list);
        list = (ListView) findViewById(R.id.noPicListView);

        // get the request from the main activity
        Bundle b = getIntent().getExtras();
        String request = b.getString("REQUEST");

        mDialog = new ProgressDialog(this);
        mDialog.setCancelable(false);
        mDialog.setMessage("Lodaing Data");
        mDialog.show();

        new GetNewsAndCalendar().execute(request);
    }

    @Override
    protected void onPause() {
        mDialog.dismiss();
        super.onPause();
    }

    class GetNewsAndCalendar extends
        AsyncTask<String, Void, ArrayList<Message>> {

        @Override
        protected ArrayList<Message> doInBackground(String... params) {
            String url = params[0];
            DOMFeedParser parser = new DOMFeedParser(url);
            return parser.parse();
        }

        @Override
        protected void onPostExecute(ArrayList<Message> result) {
            adapter2 = new NoPicAdapterV2(NoPicList.this, R.layout.no_pic_list_item, result);
            list.setAdapter(adapter2);
            mDialog.dismiss();
            }

    }

}

here is the code for the adapter:

public class NoPicAdapterV2 extends ArrayAdapter<NewAndCalendar> {
    private ArrayList<Message> data;
    private LayoutInflater inflator;
    private Activity mActivity;

    public NoPicAdapterV2(Context context, int textViewResourceId,
        ArrayList<Message> result) {
        super(context, textViewResourceId);
        data = (ArrayList<Message>) result;
        mActivity = (Activity) context;
        inflator = (LayoutInflater) mActivity
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View vi = convertView;
        if (vi == null)
            vi = inflator.inflate(R.layout.no_pic_list_item, parent, false);

        TextView title = (TextView) vi.findViewById(R.id.noPicTitle);
        TextView subtitle = (TextView) vi.findViewById(R.id.noPicSubtitle);
        TextView id = (TextView) vi.findViewById(R.id.noPicID);

        title.setText(data.get(position).getTitle().toString());
        subtitle.setText(data.get(position).getDate().toString());
        id.setText(data.get(position).getDescription());

        return vi;
    }
}

the DOMFeedParser code is built according to the IBM open source Java XML parser article.

thanks a bunch…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:27:49+00:00Added an answer on June 2, 2026 at 2:27 am

    you should override (in your custom adapter)

    getCount()
    

    and return the size of data in order to let the adpater works. Or you call the ArrayAdapter constructor that takes data

    public ArrayAdapter (Context context, int textViewResourceId, T[] objects)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
this is what i have right now Drawing an RSS feed into the php,
We're building an app, our first using Rails 3, and we're having to build
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.