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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:48:11+00:00 2026-06-13T18:48:11+00:00

I am tring to add all the values in String Array but it don’t

  • 0

I am tring to add all the values in String Array but it don’t work:

public class Info extends Activity {
private static final String TAG = "Info";

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.info);

    Intent myIntent = getIntent(); 
    Bundle b = myIntent.getExtras(); 
    String choice = b.getString("choice"); 
    String fname = b.getString("fname");
    String lname = b.getString("lname");
    String add = b.getString("add");
    String coun = b.getString("coun");
    String pro = b.getString("pro");
    String pcode = b.getString("pcode");

   Log.i(TAG,"selection: " + choice); 
   TextView textView = (TextView) findViewById(R.id.showmeText); 
   textView.append(": " + choice); 
   TextView textView1 = (TextView) findViewById(R.id.fname); 
   textView1.append(" " + fname); 
   TextView textView2 = (TextView) findViewById(R.id.lname); 
   textView2.append(" " + lname); 
   TextView textView3 = (TextView) findViewById(R.id.address1); 
   textView3.append(" " + add); 
   TextView textView4 = (TextView) findViewById(R.id.pro); 
   textView4.append(" " + pro); 
   TextView textView5 = (TextView) findViewById(R.id.country1); 
   textView5.append(" " + coun); 
   TextView textView6 = (TextView) findViewById(R.id.pcode); 
   textView6.append(" " + pcode); 

}

I tried these all values in ListView but these not working because i was adding all the Textview in ListView.Can you please help me How to add these list in String array?

  • 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-13T18:48:12+00:00Added an answer on June 13, 2026 at 6:48 pm
    Crete a ListView in your UI Deisgn layout xml. 
    
    
    <ListView android:layout_width="fill_parent" 
                android:layout_height="wrap_content" 
                            android:id="@+id/choice_list" 
                android:focusable="false"
                       android:scrollbarStyle="outsideOverlay">
    
    
    
    
    
    
    
    Step1 : Create a String Array ex: String[] myStringArray.
    
    Step 2: Push all the string values into Array.
    Step 3 : in your activity get the reference for listview (choice_list)
    
    Ex:
    
    
    ListView choiceListView = (ListView)findviewById(R.layout.choice_list)
    
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(),
                        android.R.layout.simple_dropdown_item_1line, myStringArray);
    

    choiceListView .setAdapter(adapter);

    That is all to see the out put as list view in normal activity. You don't need ListActivity , but can use this in normal activity too. The above is the solution for any activity which has a listview as a component in it. 
    
    If you like this please vote for me.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add more values to my row, but all the columns
I'm trying to create an array in MIPS Assembly, and then add all the
Im trying to add new class to existing project. My class work corectly when
I am attempting to go through an array and add up all the numbers.
i'm trying to add readonly to all the inputs and then on the click
I'm trying to add a formatter to my Automapper configuration to style all DateTime?
I'm trying to add a function that will be accessible throughout all parts of
I am trying to add a .html suffix at the end of all strings
I'm trying to add 2 seperate JLabels to 2 seperate JPanels, all within one
I am trying to add edge labels for a graph. It all works well,

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.