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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:35:07+00:00 2026-05-28T16:35:07+00:00

I want to make an application that will grab the HTML from a website

  • 0

I want to make an application that will grab the HTML from a website and display certain strings all inside the app in a linear layout. (I do not want to use webView). The data that I am retrieving changes every day; however the format is generally the same; different in only the amount of items on the page.

I am able to use jSoup (in an Async Task) to retrieve and parse the strings that I need. I also can make the string pop up in a toast message; so I can confirm that I am getting the string that I want.

My question is how I can actually display the strings in the app?

There are two different items I want to display. A name, and then a description below it.

Example:

(Name) FRENCH FRIED SHRIMP

(Description) Twelve shrimp lightly breaded with Japanese style bread crumbs and deep fried to golden brown. Served with cocktail sauce ONLY $12.49

Below is the Code that is currently displaying a string that I want.

 protected void onPostExecute(Document doc) {
        Toast.makeText(RoundtheClockActivity.this, doc.select("p").get(0).toString(), Toast.LENGTH_SHORT).show();
}

Right now I am going to want to change views to another page.. And I suppose String1 is what I want to display… Code below:

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >


<TextView
    android:id="@+id/soupSpecial1"
    android:layout_width="match_parent"
    android:layout_height="0dip"
    android:layout_weight="0.01"
    android:text="@string/string1" />

    </LinearLayout>

To add, originally I have one view; but after I do the async task; I want to change to a new view. That will display the String.

  public void onClick(View v) {
            try {
                  new DownloadTask().execute("url");
            } catch (Exception e) {
                //logic for exception here
            }
  • 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-28T16:35:08+00:00Added an answer on May 28, 2026 at 4:35 pm

    initialize your TextView in your app as below:

    TextView txtSoup;
    
    
       @Override
       public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.yourDesiredLayout);
           ...
           ...
           ...
    
           txtSoup = (TextView) findViewById(R.id.soupSpecial);
       }
    

    and in your Async Task’s onPostExecute, do the following:

    protected void onPostExecute(Document doc) {
     setContentView(R.layout.yourNewLayout);
           txtSoup.setText(doc.select("p").get(0).toString());
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make an application that will allow people to form groups to
I want to make an application that will need userLocation, but MkMapView.userLocation is just
I want to make application that when press the button it will make each
I want to make application that will use GPS, as we know at first
I want to make a simple application that will take in: number of students
I want to make a little application. That will have register, save, update, delete,
I want to make a application in php that will have a chatting module
I want to make an auto synchronize in my application that will happen every
I'm creating a application that will fetch data from an SQLite database and display
I want to make an Application that uses RxTx version 2.2pre2 to work with

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.