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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:20:49+00:00 2026-05-25T14:20:49+00:00

In the below code i got the value from the database and display in

  • 0

In the below code i got the value from the database and display in the spinner.And on click of the value in spinner some data must be display but my problem is it display only last row of the data. If you help me it would my pleasure.

SpSites.setOnItemSelectedListener(new OnItemSelectedListener() {

   public void onItemSelected(AdapterView<?> arg0, View arg1,int arg2, long arg3) {
        Object itemName = SpSites.getSelectedItem();
        String strselectedName = itemName.toString();

            for(int i = 0; i < siteName.length; i++){
                if(siteName[i].equalsIgnoreCase(strselectedName)){
                    detailEmployee = gd.selectPhoneDirectory(siteId[i]);//detailEmployee is string array
                    //Toast.makeText(Directory.this,detailEmployee[i], Toast.LENGTH_LONG).show();           

                }
                for(int j = 0;j<detailEmployee.length;j++){
                    Toast.makeText(Directory.this,detailEmployee[j], Toast.LENGTH_LONG).show();
                    System.out.println("Data :"+detailEmployee[j]);
                }
            }
        }
  • 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-25T14:20:50+00:00Added an answer on May 25, 2026 at 2:20 pm

    Everything is being shown at the same place. You only see the last element because its showing on top of the others. Use a string builder to concstenate all the items in the last for, and then do a single Toast.show()

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

Sidebar

Related Questions

I've got the code below to pull hex values from a database and create
I got code snippet from this site, which I used as shown below $data
I got below code from http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx for adding custom property in webpart tool pane.
I've got the code below, and I'm trying to set the from field to
I first got an error usign the code below, explaining that DataGridLinkButton' must be
I've got a simple question but it has got me confounded. The code below
I have got below code to GET dictionary type of session variable value. Please
I've got a TreeView whose data context is set using LayoutRoot.DataContext = value from
I've got the following T-SQL code below that's working from inside of SQL Server
I got below code in my Word Document (office 2007) to send a mail

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.