Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2011

    Question blank vector item appended to a LWUIT list

    i am retrieving data from the database,then appending it to a lwuit list using the vector as follows:
    String [] v=new String(vector);
    list=new List(v);
    when the code runs,the items are appended well but there's an extra blank item appended to the list.how do i remove that.thanks.

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011

    Re: blank vector item appended to a LWUIT list

    Hi ali30,

    You could try to catch the extra character when you receive the data from the database so that your array doesn't contain it. One suggestion would be to parse your data character by character and look for non printable characters like \r \f \n \e. Or you could create a new String array similar to the original but without the last element as follows (provided that the blank is always the last item in the list):
    String [] v_new = new String[v.length - 1];
    for(int i=0;i<v.length-1;i++) {
        v_new[i] = v[i];
    list = new List(v_new);
    Last edited by skalogir; 2012-03-19 at 20:41.

Similar Threads

  1. QML List (Horizontal list) - flick to highlight next item
    By brian.egan in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-09-23, 13:19
  2. lwuit list +sub list its need to show sub list
    By babu7575 in forum Mobile Java General
    Replies: 0
    Last Post: 2011-04-04, 14:12
  3. Disable a prticular item in my Setting Item list
    By TAHIR in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-03-16, 05:26
  4. Replies: 4
    Last Post: 2009-02-17, 21:24
  5. Replies: 6
    Last Post: 2009-01-08, 13:06

Posting Permissions

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