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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:08:02+00:00 2026-05-23T13:08:02+00:00

I use SimpleAdapter to display 2 strings, one on the left and the other

  • 0

I use SimpleAdapter to display 2 strings, one on the left and the other on the right, into a ListView,

The strings are in 2 different arrays. and 1st from array A with 1st in array B are in the 1st line, and so on..

Here is a part of the code I use:

    String[] array= getResources().getStringArray(R.array.Names_List);
    
    int lengthtmp= array.length;
    for(int i=0;i<lengthtmp;i++)
    {
        counter++;
        AddToList(array[i]);            
    }

    adapter = new SimpleAdapter(this,list,R.layout.start_row,new String[] {"number","suraname"},new int[] {R.id.Start_Numbering,R.id.Start_Name});

      
   private void AddToList(String name) {
    HashMap<String,String> temp = new HashMap<String,String>();

    
    temp.put("number", Integer.toString(SortingPictures[counter-1]));

    temp.put("suraname", name);
    list.add(temp);

}

I’m sure there is a better way to make what I want. What’s the correct way?

  • 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-23T13:08:02+00:00Added an answer on May 23, 2026 at 1:08 pm

    No it is not a proper way to implementing this here i am given a link for you read id and get idea for implementing it.

    http://www.heikkitoivonen.net/blog/2009/02/15/multicolumn-listview-in-android/

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

Sidebar

Related Questions

I'm trying to put different images (.jpg , .png) dynamically into a ListView from
USE AdventureWorks2008R2; GO INSERT INTO myTestSkipField SELECT * FROM OPENROWSET(BULK 'C:\myTestSkipField-c.dat', FORMATFILE='C:\myTestSkipField.fmt' ) AS
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
We use a data acquisition card to take readings from a device that increases
I'm struggling with updating my ListView after the user have deleted a row from
use javascript or other method ? have any recommendation?
Use Eclipse Classic with ADT plugin. Tried to make project from existing example of
I've got a ListView that displays an array that is generated dynamically by the
I'd like to map an Array of complex data to a ListView. In a
I've a ListView and when the user clicks on one of its items I

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.