Results 1 to 19 of 19
  1. #1
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Android\Eclipse: Populate the ListView with dynamic Array

    Hi all, hope in your help.

    I have in the Android app a ListView on the Activity which will then be populated by the names in the Array ItemDetails.

    The problem is that the ListView dosen't seem to be populated in full because in output I've only first value of array and this string:
    Java Code:
    [Ljava.lamg.String;@42974730
    Can you help me?
    Thanks in advance

    The Activity:

    Java Code:
    import java.util.ArrayList;
    
    import org.ksoap2.SoapEnvelope;
    import org.ksoap2.serialization.SoapObject;
    import org.ksoap2.serialization.SoapPrimitive;
    import org.ksoap2.serialization.SoapSerializationEnvelope;
    import org.ksoap2.transport.HttpTransportSE;
    
    import android.annotation.SuppressLint;
    import android.app.Activity;
    import android.os.Bundle;
    import android.os.StrictMode;
    import android.text.Html;
    import android.text.Spanned;
    import android.util.Log;
    import android.widget.ListView;
    
    public class ListViewImagesActivity extends Activity {
    
        private static final String SOAP_ACTION = "http://www.xxx.net/WebService/GetNews";
        private static final String OPERATION_NAME = "GetNews";
        private static final String WSDL_TARGET_NAMESPACE = "http://www.xxx.net/WebServiceNews";
        private static final String SOAP_ADDRESS = "http://www.xxx.net/GetNews.asmx";
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            ArrayList<ItemDetails> image_details = GetSearchResults();
            final ListView lv1 = (ListView) findViewById(R.id.listV_main);
            lv1.setAdapter(new ItemListBaseAdapter(this, image_details));
    
        }
    
        private ArrayList<ItemDetails> GetSearchResults() {
            ArrayList<ItemDetails> results = new ArrayList<ItemDetails>();
    
            SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,
                    OPERATION_NAME);
    
            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
    
            envelope.dotNet = true;
            envelope.implicitTypes = false;
            envelope.setOutputSoapObject(request);
    
            HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
            httpTransport.debug = true;
            envelope.setOutputSoapObject(request);
    
            try {
    
                httpTransport.call(SOAP_ACTION, envelope);
                SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
    
                String ws = response.toString();
                Log.i("wsString", ws.toString());
    
                String wsnew = ws.replaceAll("<br />", "\n");
                Log.i("ws", wsnew);
    
                String[] wss = wsnew.split("\n");
                Log.i("wss0", wss[0].toString());
                Log.i("wss1", wss[1].toString());
                Log.i("wss2", wss[2].toString());
    
                Spanned spanned = Html.fromHtml(wss.toString());
    
                ItemDetails item_details = new ItemDetails();
                item_details = new ItemDetails();
                item_details.setName(spanned.toString());
                item_details.setImageNumber(1);
                results.add(item_details);
    
            } catch (Exception exception) {
                Log.e("Error:  ", exception.toString());
            }
    
            return results;
        }

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Also posted at: Android Eclipse: Populate the ListView with dynamic Array

    names in the Array ItemDetails.
    I don't see an array (Array??)
    and I don't see a variable named: ItemDetails.

    Could you be more specific(and correct) and give the type of container the names are in and the name of the variable? Case and spelling is important in java.
    Last edited by Norm; 04-19-2014 at 02:41 AM.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Hi,

    The problem is your wss.toString() call.

    Just do this quick test:
    Java Code:
    String[] testNames = { "konrad", "otto" };
    System.out.println(testNames.toString());
    So you see that yourself.

    Konrad

  4. #4
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Many thanks for help and suggestion.

    My work is inspired for this tutorial:
    Android ListView example with Image and Text : Java Sri Lankan Support

    If the ListView is static I don't have problem but can't if the ListView is dynamic, because in output I've only first value of array and this string:

    Java Code:
    [Ljava.lang.String;@42974730
    If tried:
    Java Code:
    String[] testNames = { "konrad", "otto" };
    System.out.println(testNames.toString());
    The output is correct in printIn, but what good this test? I know that it works with static data ... thank you
    Last edited by Chevy; 04-19-2014 at 01:13 PM.

  5. #5
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    I am just wondering now: You did the test that I wrote and received and output that was not something like "[Ljava.lang.String;@1db9742"?

    An array is an array. It does not make any difference if you do
    Java Code:
    String[] testNames = { "konrad", "otto" };
    or
    Java Code:
    String[] testNames = new String[2];
    testNames[0]="konrad";
    testNames[1]="otto";
    So instead of your wss.toString() you could do something like Arrays.toString(wss).

    With kind regards,

    Konrad

  6. #6
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Hi Konrad, your help is very appreciated, thanks again.

    My problem is this remote string source .NET Web Service:
    Java Code:
    https://www.LinkFromImageonTheGoogle.net/myImage.png<br />23/03/2014<br /><a href=http://www.mywebpage.net?ID=764>My remote pics</a><br /><br />
    
    https://www.LinkFromImageonTheGoogle.net/myImage1.png<br />22/03/2014<br /><a href=http://www.mywebpage.net?ID=765>My remote pics 1</a><br /><br />
    
    https://www.LinkFromImageonTheGoogle.net/myImage2.png<br />21/03/2014<br /><a href=http://www.mywebpage.net?ID=766>My remote pics 2</a><br /><br />
    I need shows in my ListView the remote full string above.

    I work the string of .NET Web Service :
    Java Code:
                String ws = response.toString();
                Log.i("wsString", ws.toString());
     
                String wsnew = ws.replaceAll("<br />", "\n");
                Log.i("ws", wsnew);
     
                String[] wss = wsnew.split("\n");
    For this output in ListView:
    Java Code:
    https://www.LinkFromImageonTheGoogle.net/myImage.png
    23/03/2014
    <a href=http://www.mywebpage.net?ID=764>My remote pics</a>
    
    https://www.LinkFromImageonTheGoogle.net/myImage1.png
    22/03/2014
    <a href=http://www.mywebpage.net?ID=765>My remote pics 1</a>
    
    https://www.LinkFromImageonTheGoogle.net/myImage2.png
    21/03/2014
    <a href=http://www.mywebpage.net?ID=766>My remote pics 2</a>
    But with my code in this moment in ListView I've only:
    Java Code:
    [Ljava.lang.String;@42974730
    If tried this:
    Java Code:
    item_details.setName(Arrays.toString(wss));
    The output is this string in only line:
    Java Code:
    https://www.LinkFromImageonTheGoogle.net/myImage.png<br />23/03/2014<br /><a href=http://www.mywebpage.net?ID=764>My remote pics</a><br /><br />
    
    https://www.LinkFromImageonTheGoogle.net/myImage1.png<br />22/03/2014<br /><a href=http://www.mywebpage.net?ID=765>My remote pics 1</a><br /><br />
    
    https://www.LinkFromImageonTheGoogle.net/myImage2.png<br />21/03/2014<br /><a href=http://www.mywebpage.net?ID=766>My remote pics 2</a><br /><br />
    And not:
    Java Code:
    https://www.LinkFromImageonTheGoogle.net/myImage.png
    23/03/2014
    <a href=http://www.mywebpage.net?ID=764>My remote pics</a>
     
    https://www.LinkFromImageonTheGoogle.net/myImage1.png
    22/03/2014
    <a href=http://www.mywebpage.net?ID=765>My remote pics 1</a>
     
    https://www.LinkFromImageonTheGoogle.net/myImage2.png
    21/03/2014
    <a href=http://www.mywebpage.net?ID=766>My remote pics 2</a>
    I'm novice and hope in your help for resolve this problem.
    Last edited by Chevy; 04-19-2014 at 03:33 PM.

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    What's in image_details? Print it out at line 30 to see what is in the ArrayList.

    What does the class: ItemListBaseAdapter do with data passed to it?
    If you don't understand my response, don't ignore it, ask a question.

  8. #8
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Quote Originally Posted by Norm View Post
    What's in image_details? Print it out at line 30 to see what is in the ArrayList.

    What does the class: ItemListBaseAdapter do with data passed to it?
    Okay, thank you.

    Here the full codes:

    ItemDetails

    Java Code:
    public class ItemDetails {
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getItemDescription() {
            return itemDescription;
        }
    
        public void setItemDescription(String itemDescription) {
            this.itemDescription = itemDescription;
        }
    
        public String getPrice() {
            return price;
        }
    
        public void setPrice(String price) {
            this.price = price;
        }
    
        public int getImageNumber() {
            return imageNumber;
        }
    
        public void setImageNumber(int imageNumber) {
            this.imageNumber = imageNumber;
        }
    
        private String name;
        private String itemDescription;
        private String price;
        private int imageNumber;
    
    }
    ItemListBaseAdapter

    Java Code:
    import java.util.ArrayList;
    
    import android.content.Context;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.BaseAdapter;
    import android.widget.ImageView;
    import android.widget.TextView;
    
    public class ItemListBaseAdapter extends BaseAdapter {
        private static ArrayList<ItemDetails> itemDetailsrrayList;
    
        private Integer[] imgid = { R.drawable.p1, R.drawable.bb2, R.drawable.p2,
                R.drawable.bb5, R.drawable.bb6, R.drawable.d1 };
    
        private LayoutInflater l_Inflater;
    
        public ItemListBaseAdapter(Context context, ArrayList<ItemDetails> results) {
            itemDetailsrrayList = results;
            l_Inflater = LayoutInflater.from(context);
        }
    
        public int getCount() {
            return itemDetailsrrayList.size();
        }
    
        public Object getItem(int position) {
            return itemDetailsrrayList.get(position);
        }
    
        public long getItemId(int position) {
            return position;
        }
    
        public View getView(int position, View convertView, ViewGroup parent) {
            ViewHolder holder;
            if (convertView == null) {
                convertView = l_Inflater.inflate(R.layout.item_details_view, null);
                holder = new ViewHolder();
                holder.txt_itemName = (TextView) convertView
                        .findViewById(R.id.name);
                holder.txt_itemDescription = (TextView) convertView
                        .findViewById(R.id.itemDescription);
                holder.txt_itemPrice = (TextView) convertView
                        .findViewById(R.id.price);
                holder.itemImage = (ImageView) convertView.findViewById(R.id.photo);
    
                convertView.setTag(holder);
            } else {
                holder = (ViewHolder) convertView.getTag();
            }
    
            holder.txt_itemName
                    .setText(itemDetailsrrayList.get(position).getName());
            holder.txt_itemDescription.setText(itemDetailsrrayList.get(position)
                    .getItemDescription());
            holder.txt_itemPrice.setText(itemDetailsrrayList.get(position)
                    .getPrice());
            holder.itemImage.setImageResource(imgid[itemDetailsrrayList.get(
                    position).getImageNumber() - 1]);
    
            return convertView;
        }
    
        static class ViewHolder {
            TextView txt_itemName;
            TextView txt_itemDescription;
            TextView txt_itemPrice;
            ImageView itemImage;
        }
    }

  9. #9
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    What's in image_details? Print it out at line 30 to see what is in the ArrayList.

    A useless method:
    Java Code:
      public long getItemId(int position) {
            return position;    // return arg ???
        }
    Last edited by Norm; 04-19-2014 at 04:27 PM.
    If you don't understand my response, don't ignore it, ask a question.

  10. #10
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Quote Originally Posted by Norm View Post
    What's in image_details? Print it out at line 30 to see what is in the ArrayList.

    A useless method:
    Java Code:
      public long getItemId(int position) {
            return position;    // return arg ???
        }
    In Image_details I've:
    Java Code:
    04-19 17:19:31.656: I/image_details(8773): [com.xxxxx.ItemDetails@41f84528]
    In output:
    The image P1.jpg and in one large string all values of remote string of .NET Web Service...
    Last edited by Chevy; 04-19-2014 at 05:26 PM.

  11. #11
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    That looks the the ArrayList contains one ItemDetails object.

    Comment on code:
    Java Code:
    //  Repeatedly getting a reference out of the ArrayList 
            holder.txt_itemName
                    .setText(itemDetailsrrayList.get(position).getName());
            holder.txt_itemDescription.setText(itemDetailsrrayList.get(position)
                    .getItemDescription());
            holder.txt_itemPrice.setText(itemDetailsrrayList.get(position)
                    .getPrice());
            holder.itemImage.setImageResource(imgid[itemDetailsrrayList.get(
                    position).getImageNumber() - 1]);
    // vs  get it once and use it -> makes code easier to read
            ItemDetail id = itemDetailsrrayList.get(position); // GET IT ONCE
            holder.txt_itemName.setText(id.getName());
            holder.txt_itemDescription.setText(id.getItemDescription());
            holder.txt_itemPrice.setText(id.getPrice());
            holder.itemImage.setImageResource(imgid[id.getImageNumber() - 1]);
    Last edited by Norm; 04-19-2014 at 05:47 PM.
    If you don't understand my response, don't ignore it, ask a question.

  12. #12
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    I don't understand... I'm sorry

  13. #13
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Just showing what I think is easier code to read.

    Still don't see where the String array's toString() method is called.
    The call to toString() can be generated by the compiler when a String is required from an array when the array is used in the context where a String is required.

    Where is there a String array?

    See post#3. Trace where the String from the toString() method goes.
    Last edited by Norm; 04-19-2014 at 07:12 PM.
    If you don't understand my response, don't ignore it, ask a question.

  14. #14
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Hi Norm,

    I think it is the array inside ListViewImagesActivity.GetSearchResults():
    The results are used in onCreate() to fill the list.

    And in GetSearchResult() he splits a string into an array of strings and then uses this with a simple .toString() which should cause the problem.

    [Edit: Now I start talking to the op of course!]

    I am not sure, if I understand your problem right now. If you want the 3 elements printed with a line separator, then you could do something like
    wss[0] + "\n" + wss[1] + "\n" + wss[2] (Maybe check if there are really 3 items in the list so you do not get an exception).

    But of course: The prefered solution I would do is more object oriented. I would create a class that holds that information (whatever that is). Then I would have a Parse method (or a constructor that takes your string) and then gets the details. And of course: Then you could do a simple toString() because you could create it as you want it.

    In that case, your code of
    Java Code:
                String ws = response.toString();
                Log.i("wsString", ws.toString());
     
                String wsnew = ws.replaceAll("<br />", "\n");
                Log.i("ws", wsnew);
     
                String[] wss = wsnew.split("\n");
                Log.i("wss0", wss[0].toString());
                Log.i("wss1", wss[1].toString());
                Log.i("wss2", wss[2].toString());
     
                Spanned spanned = Html.fromHtml(wss.toString());
    would end with something like:
    Java Code:
               WhateverThisIs something = WhateverThisIs.Parse(response.String()); // Or WhateverThisIs something = new WhateverThisIs(response.String()); if you prefer the constructor way.
               Spanned spanned = Html.fromHtml(something.toString());
    which is shorter and much easier to read. Also easy to unit test. But of course: You need good names for WhateverThisIs and something so it is really readable.

    Regarding Parse or Constructor: I am not sure, but I think that the Constructor one is the prefered Java way. In .Net (in that area I earn my money) a lot of types have Parse and TryParse methods. But in Java (I just checked the Integer class) it seems that they have the Constructor and a ParseInt method. That seems to be double information: Integer.ParseInt ... What else should Integer parse if not an int? But there is absolutly no reason to discuss design decisions of the creators of java. If you develop in java then do it the Java way please. That is what other developers would expect and it makes even your life easier! So maybe you also do both?

    With kind regards,

    Konrad

  15. #15
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Quote Originally Posted by Norm View Post
    Just showing what I think is easier code to read.

    Still don't see where the String array's toString() method is called.
    The call to toString() can be generated by the compiler when a String is required from an array when the array is used in the context where a String is required.

    Where is there a String array?

    See post#3. Trace where the String from the toString() method goes.
    Okay Norm, I've traced the string this is the output in LogCat
    Java Code:
    04-20 11:20:44.089: I/wsString(5842): 
    https://www.LinkFromImageonTheGoogle.net/myImage.png<br />23/03/2014<br /><a href=http://www.mywebpage.net?ID=764>My remote pics</a><br /><br />
    https://www.LinkFromImageonTheGoogle.net/myImage1.png<br />09/03/2014<br /><a href=http://www.mywebpage.net?ID=765>My remote pics 1</a><br /><br />
    https://www.LinkFromImageonTheGoogle.net/myImage2.png<br />25/02/2014<br /><a href=http://www.mywebpage.net?ID=766>My remote pics 2</a><br /><br />
    
    
    04-20 11:20:44.089: I/ws(5842): https://www.LinkFromImageonTheGoogle.net/myImage.png
    04-20 11:20:44.089: I/ws(5842): 23/03/2014
    04-20 11:20:44.089: I/ws(5842): <a href=http://www.mywebpage.net?ID=764>My remote pics</a>
    
    04-20 11:20:44.089: I/ws(5842): https://www.LinkFromImageonTheGoogle.net/myImage1.png
    04-20 11:20:44.089: I/ws(5842): 09/03/2014
    04-20 11:20:44.089: I/ws(5842): <a href=http://www.mywebpage.net?ID=765>My remote pics 1</a>
    
    04-20 11:20:44.089: I/ws(5842): https://www.LinkFromImageonTheGoogle.net/myImage2.png
    04-20 11:20:44.089: I/ws(5842): 25/02/2014
    04-20 11:20:44.089: I/ws(5842): <a href=http://www.mywebpage.net?ID=766>My remote pics 2</a>

  16. #16
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,421
    Rep Power
    25

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Have you solved it now?
    If you don't understand my response, don't ignore it, ask a question.

  17. #17
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Quote Originally Posted by Norm View Post
    Have you solved it now?
    Not Sir I not solved ...

    In output ListView I've:
    The image P1.jpg and in one large string (not linkable) all values of remote string of .NET Web Service...

    Instead of:

    In first line of ListView
    myImage.png
    23/03/2014
    My remote pics -linkable for -http://www.mywebpage.net?ID=764-

    In second line of ListView
    myImage1.png
    22/03/2014
    My remote pics 1 -linkable for -http://www.mywebpage.net?ID=765-

    In three line of ListView
    myImage2.png
    21/03/2014
    My remote pics 2 -linkable for -http://www.mywebpage.net?ID=766-

  18. #18
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Hi,

    I am just wondering if I understood the core problem correctly.

    We are talking about this code:

    Java Code:
                String wsnew = ws.replaceAll("<br />", "\n");
                Log.i("ws", wsnew);
     
                String[] wss = wsnew.split("\n");
                Log.i("wss0", wss[0].toString());
                Log.i("wss1", wss[1].toString());
                Log.i("wss2", wss[2].toString());
    And you receive this log information:
    Java Code:
                Log.i("ws", wsnew);
    gives you
    04-20 11:20:44.089: I/wsString(5842):
    https://www.LinkFromImageonTheGoogle.net/myImage.png<br />23/03/2014<br /><a href=http://www.mywebpage.net?ID=764>My remote pics</a><br /><br />
    https://www.LinkFromImageonTheGoogle.net/myImage1.png<br />09/03/2014<br /><a href=http://www.mywebpage.net?ID=765>My remote pics 1</a><br /><br />
    https://www.LinkFromImageonTheGoogle.net/myImage2.png<br />25/02/2014<br /><a href=http://www.mywebpage.net?ID=766>My remote pics 2</a><br /><br />

    and
    Java Code:
                Log.i("wss0", wss[0].toString());
                Log.i("wss1", wss[1].toString());
                Log.i("wss2", wss[2].toString());
    gives you:
    04-20 11:20:44.089: I/ws(5842): https://www.LinkFromImageonTheGoogle.net/myImage.png
    04-20 11:20:44.089: I/ws(5842): 23/03/2014
    04-20 11:20:44.089: I/ws(5842): <a href=http://www.mywebpage.net?ID=764>My remote pics</a>

    But where did you get the other 2 elements? I do not see a loop in there. I would expect that your wss array has more elements and that these will contain these elements. Or am I wrong?

    Something completly does not fit. Code and log seems to not work together.

    So if I understood it correctly, then you could have something like this:
    Java Code:
    int i = 0;
    while (i+3 <= wss.length) {
      // Log to see if that is what you really want!
      Log.i("wss0", wss[i].toString());
      Log.i("wss1", wss[i+1].toString());
      Log.i("wss2", wss[i+2].toString());
      // Now we put these 3 items together as a string:
      String elementText = wss[i] + "\n" + wss[i+1] + "\n" + wss[i+2];
      // Here you could log that text if you want.
      // and you add it to your List
      ItemDetails item_details = new ItemDetails();
      item_details.setName(elementText);
      item_details.setImageNumber(1);
      results.add(item_details);
    }
    So if I understood your logs and the code correctly, that might be what you want.

    But I fear that I could be completly wrong.

    With kind regards,

    Konrad

  19. #19
    Chevy is offline Member
    Join Date
    Apr 2014
    Posts
    9
    Rep Power
    0

    Default Re: Android\Eclipse: Populate the ListView with dynamic Array

    Hello Konrad, thank you for help.

    With your last code suggestion I've the crash of application and in:
    Java Code:
    Log.i("wss0", wss[0].toString());
    Log.i("wss1", wss[1].toString());
    Log.i("wss2", wss[2].toString());
    I've the same values replicated in an infinite loop ...
    Last edited by Chevy; 04-21-2014 at 08:12 PM.

Similar Threads

  1. Replies: 1
    Last Post: 11-05-2012, 01:08 AM
  2. using an if statement to populate an array
    By MrJinx in forum New To Java
    Replies: 3
    Last Post: 04-30-2011, 12:01 PM
  3. Replies: 4
    Last Post: 04-22-2011, 07:24 PM
  4. Populate an array dynamically
    By mmarkym in forum New To Java
    Replies: 11
    Last Post: 12-31-2010, 03:31 PM
  5. Ripping apart a array list to populate a vector
    By Adrien in forum AWT / Swing
    Replies: 0
    Last Post: 03-07-2010, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •