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

  • Home
  • SEARCH
  • 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 9248905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:03:44+00:00 2026-06-18T10:03:44+00:00

I have an Android application in which i send data from one activity to

  • 0

I have an Android application in which i send data from one activity to another. I can do that part easily but the problem is i want to display some additional TextViews as well. So when i display the sent data using setContentView i can see only the sent data. I cannot see the additional TextViews. I want both of them to be displayed simultaneously.

I searched and tried hard to find a solution without any luck.I am attaching the code for reference.Thanks!

 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_crop_information);
    Intent intent = getIntent();
    String message = intent.getStringExtra(CropsListActivity.EXTRA_MESSAGE);
    TextView textViewci= new TextView(this);
    textViewci.setText(message);
    TextView textView1= new TextView(this);
    TextView textView2= new TextView(this);
    textView1.setText("Major Districts");
    textView2.setText("Suitable Soil");

When i use this code,i am unable to see anything and the activity remains blank.Actually i am using a TableLayout here so that i can display data in form of tables

  • 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-18T10:03:46+00:00Added an answer on June 18, 2026 at 10:03 am

    I have found out the answer by myself.It’s fairly easy and there is no need here to use views in the parent layout.I modified the textViews in my xml file and got their values using findViewById.I am attaching the updated code.

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_crop_information);
        Intent intent = getIntent();
        String message = intent.getStringExtra(CropsListActivity.EXTRA_MESSAGE);
        textView=(TextView)findViewById(R.id.textViewci);
        textView1=(TextView)findViewById(R.id.textViewmd);
        textView2=(TextView)findViewById(R.id.textViewso);
        textView.setText(message);
        textView1.setText("Major Districts");
        textView2.setText("Suitable Soil");
        tf = Typeface.createFromAsset(getAssets(), "fonts/SHRUTIB.TTF");
        textView.setTypeface(tf);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android application from which I want to upload some data to
We have developed one android application which will send the request and receive the
I have a problem with my android application. That application which uses the kSOAP
I am developing android application in which i have to open option menu from
So I have this Android Application that's in WebView that should pass the data
I currently have an Android application that has an intent-filter to receive images from
I have created one native application in android that is working fine. This application
I have a client application in Android which uses HttpURLConnection to send files to
I have a service running in my Android application which contains a HashMap that
I have an Android application in the market which connects and send POST and

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.