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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:38:13+00:00 2026-06-04T23:38:13+00:00

i want to make a Real Time Trading App.. but i have a problem

  • 0

i want to make a Real Time Trading App.. but i have a problem to combine 2 adapter into one adapter. so i need help from you all 😀

here’s my code

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

    final uraikonversiActivity cp = new uraikonversiActivity(this);
    final ListView list = (ListView) findViewById (R.id.list);
    final String list_array[] = new String[cp.kodekonversi.size()];
    final Float list_nilai[] = new Float[cp.nilaikonversi.size()];


    for (int i = 0; i < cp.kodekonversi.size(); i++) {
        list_array[i] = cp.kodekonversi.get(i);
    }

    for (int i = 0; i < cp.nilaikonversi.size(); i++) {
        list_nilai[i] = cp.nilaikonversi.get(i);

    }



    ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1, list_array);
    ArrayAdapter adapter1 = new ArrayAdapter(this, android.R.layout.simple_list_item_1, list_nilai);
    list.setAdapter(adapter);

}}

(note : this a real time so i got the arraylist from the internet)

my goal is to show something like this at the list = “USD – 1.xxxxx”.

thanks in advance 🙂

  • 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-04T23:38:15+00:00Added an answer on June 4, 2026 at 11:38 pm

    At last you are displaying all data withing one listview.So just convert both arrays into one like this(as both arrays are of same lenth):

    String[] finalArray = new String[list_array.length + list_nilai.length];
    for(int i = 0; i< cp.nilaikonversi.size(); ++i)
    finalArray[i] = list_array[i] +"-" + list_nilai[i];
    
    ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1, finalArray);
    list.setAdapter(adapter);
    

    Hope it will help you. 🙂

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

Sidebar

Related Questions

Idea: I want to make smth like real time electronic blackboard. Many users have
I want to make an app which shows cardio graph in real time. That
I want to make a real time form validation in asp.net form in which
I want to take ( in real time ) video stream and make some
I have a single page web app that shows real time data using just
i want to make a real-time update for my flash application. Instead on making
I have a free web site that streams real-time stock-options data. I want to
I want to have a real-time process take over my computer. :) I've been
I want to make the time of each post to change in realTime. This
I am new android app developer i want make app for tablets and phone

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.