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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:48:33+00:00 2026-06-09T18:48:33+00:00

I have this code: for Iterator <(PhoneNumber)> i = num.iterator(); i.hasNext();) { PhoneNumber aNum

  • 0

I have this code:

for Iterator <(PhoneNumber)> i = num.iterator(); 
i.hasNext();)
 {
   PhoneNumber aNum = i.next();
   String phoneNum = aNum.getNumber();          
   Number.append(phoneNum + "\n");
 }

Basically what I want to do is to add the value of phoneNum into an array to that I can populate the array into a listview.

At the moment, the values show up into the textview (Number). If I change the append to setText, then it only adds the last value, and if I add a break, then it only shows the first value.

  • 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-09T18:48:34+00:00Added an answer on June 9, 2026 at 6:48 pm

    I don’t know if I understand well, but i can try….

    ArrayList<String> numList = new ArrayList<String>();
    Iterator <(PhoneNumber)> i = num.iterator();
    while(litr.hasNext()) {
    
        PhoneNumber aNum = i.next();
        litr.set(element + "+");
        String phoneNum = aNum.getNumber();    
        //this adds element into list
        numList.add(phoneNum);   
        Number.append(phoneNum + "\n");
    
    }
    

    and for notify the change you must call

    notifyDataSetChanged();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: FVDTO.setStatus(fail); List<String[]> invalidFields = new ArrayList<String[]>(); Iterator<ConstraintViolation<HazardSubmission>> iterator = cv.iterator();
I have this simple code public String toString() { **Iterator it = list.iterator();** String
I have this loop for (it= someCollection.iterator; it.hasNext(); ) { //some code here }
Right now, I have this code: bool isAnyTrue() { for(std::list< boost::shared_ptr<Foo> >::iterator i =
i have this snippet of code that use an iterator on a list for
I have this bit of code: cerr << client->inventory.getMisc().front()->getName() << endl; vector<itemPtr>::iterator it; it
This is my code: Iterator it = queue.iterator(); while(it.hasNext()){ random = randNumber(1,2); if(random ==
Another quick question here, I have this code: string sa[6] = { Fort Sumter,
I have this code: int main() { vector<int> res; res.push_back(1); vector<int>::iterator it = res.begin();
I have this code: public IEnumerable<int> Iterator { get { if (false) yield return

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.