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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:04:13+00:00 2026-05-25T22:04:13+00:00

How to assign more than one List in Android? List<String> inc = dh.selectInct1(); ArrayAdapter<String>

  • 0

How to assign more than one List in Android?

List<String> inc = dh.selectInct1();
    ArrayAdapter<String> inc1 = new ArrayAdapter<String>(this,R.layout.list,R.id.textViewx,inc);
    lvinc.setAdapter(inc1);
lvinc.setOnItemClickListener(this);

Here dh.selectInct1(); returns a list that is assigned into inc. Now I need to add one more list from database to this already existing inc. How to achieve it?

  • 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-25T22:04:14+00:00Added an answer on May 25, 2026 at 10:04 pm

    Simply join those two Lists using addAll(Collection c)

    List<String> inc = dh.selectInct1();
    List<String> inc2 = dh.selectInct2();  //select your data to second list
    inc.addAll(inc2); // join them together
    ArrayAdapter<String> inc1 = new ArrayAdapter<String>(this,R.layout.list,R.id.textViewx,inc);
    lvinc.setAdapter(inc1);
    lvinc.setOnItemClickListener(this);
    
    • How do I join two lists in Java?
    • List.addAll() documentation
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I assign more than one CssClass to a control in asp.net?How to do
I'm wondering if anyone knows if it's possible to assign more than one static
Is there a way to assign a process to a core (or more than
Is it possible to store more than one value and query the database and
The MySQL documentation implies that you can assign one or more of a table's
Using VB.Net and C#.Net. For Example Am Using More than one form If am
A TreeNode class has Text Name Tag I need to assign more values to
This question was asked to me in an interview. Suppose char *p=malloc(n) assigns more
//assign variables string measurementIn; //read in file in array string[] lines = File.ReadAllLines(../../convert.txt); //ask
I want to assign the decimal variable "trans" to the double variable "this.Opacity". decimal

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.