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 6325999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:59:56+00:00 2026-05-24T16:59:56+00:00

I am using this code to retreive Elements from a html page. // Get

  • 0

I am using this code to retreive Elements from a html page.

// Get all td's that are a child of a row - each game has 4 of these
Elements games = doc.select("tr > td.indexList1, tr > td.indexList2");

// Iterator over those elements
ListIterator<Element> gameIt = games.listIterator();

while (gameIt.hasNext()) {
// Get the title of the game
Element title = gameIt.next();

System.out.println(title.text());

// Unneeded elements
Element platform = gameIt.next();
Element genre = gameIt.next();

// Get the release date of the game
Element release = gameIt.next();
System.out.println(release.text() + "\n@@@@@@");
}

How would i go about putting these elements in a ListView with two textviews for the title element and the other for the release element?

EDIT-gives me this error

08-15 14:49:37.730: ERROR/AndroidRuntime(18945): FATAL EXCEPTION: main
08-15 14:49:37.730: ERROR/AndroidRuntime(18945): android.content.res.Resources$NotFoundException: Resource ID #0x7f050001
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.content.res.Resources.getValue(Resources.java:1014)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at    android.content.res.Resources.loadXmlResourceParser(Resources.java:2049)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.content.res.Resources.getLayout(Resources.java:853)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:375)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.ArrayAdapter.getView(ArrayAdapter.java:366)
 08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.AbsListView.obtainView(AbsListView.java:1970)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1228)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.ListView.onMeasure(ListView.java:1139)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.view.View.measure(View.java:10828)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
08-15 14:49:37.730: ERROR/AndroidRuntime(18945):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)

Here is my xml layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@+id/outputTextView"
/>
<ListView    android:layout_height="wrap_content" android:id="@+id/list"   android:layout_width="match_parent"></ListView>
</LinearLayout>
  • 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-05-24T16:59:57+00:00Added an answer on May 24, 2026 at 4:59 pm

    A ListView is abstracted away from the items themselves and therefore refers to a ListAdapter for the actual items.

    So you have to put the actual items in a ListAdapter and then call ListView.setAdapter(ListAdapter yourListAdapter).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this code, and I get the stack trace that is listed below.
I'm using the following code to get the image filenames from an HTML file.
I'm using this code from Microsoft to play audio notifications for my application. It's
I get an error when I compile this code: using System; public struct Vector2
I'm using this code, to make a request to a given URL: private static
I'm using this code to reset the identity on a table: DBCC CHECKIDENT('TableName', RESEED,
How can I change the master volume level? Using this code [DllImport (winmm.dll)] public
I am using this php code: exec(unrar e file.rar,$ret,$code); and getting an error code
I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. }
I have this code: using DC = MV6DataContext; using MV6; // Business Logic Layer

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.