view the json data in the custom list field

Hi, I did analysis json and I created the custom list field. Now, I want to display only the data analyzed in my custom list field. I'll post my analyzed data from json and here is the code for my custom list field
data analyzed.
I have THREE channels of json and I want to show content tittle and date in the list filed. I'll post the screenshot of my list.

JSONArray jsnarry = new JSONArray(responce);
            System.out.println("\n--length----- "+jsnarry.length());
            //System.out.println("....................................................=");
            for (int i = 0; i < jsnarry.length(); i++){

                JSONArray inerarray = jsnarry.getJSONArray(i);
                    //System.out.println("\n-inerarray-values----- "+inerarray.getString(i1));
                    String TITTLE = inerarray.getString(1);
                    String CONTENT = inerarray.getString(2);
                    String DATE = inerarray.getString(3);
                                                       System.out.println("TITTLE= "+TITTLE);
                    System.out.println("CONTENT= "+CONTENT);
                    System.out.println("DATE= "+DATE);

}

output

[0.0] --length----- 2
[0.0]
[0.0] -innerarray-length----- 6

[0.0] TITTLE= BJP State President Sanjay Tandon's visit to Amita Shukla's Home
[0.0] CONTENT=  BJP President Chandigarh Sanjay Tandon at Amita Shukla's Home
[0.0] DATE= 2013-01-04
[0.0] ................................................
[0.0] TITTLE= Sanjay Tandon at mahasamadhi of Satya Shri Sai baba.
[0.0] CONTENT= BJP Chandigarh President, Sanjay Tandon mahasmadhi of Sri Satya Sai Baba.(Andhra Pradesh)
[0.0] DATE= 2013-01-13

and my custom list field

       super(NO_VERTICAL_SCROLL);

         String TITTLE="TITTLE";
         String CONTENT = "CONTENT";
         String DATE = "DATE";

         v.addElement(new ListRander(listThumb, TITTLE, CONTENT,DATE, navBar));

         myListView = new CustomListField(v){

             protected boolean navigationClick(int status, int time) {
                 //Dialog.alert(" time in milisec :" + time);
                 return true;
             }
         };

CustomListField.java

public class CustomListField extends ListField implements ListFieldCallback {

    private Vector _listData;
    private int _MAX_ROW_HEIGHT = 100;

    public CustomListField (Vector data) {

        _listData = data;
        setSize(_listData.size());
        setSearchable(true);
        setCallback(this);
        setRowHeight(_MAX_ROW_HEIGHT);

    }

    public int moveFocus (int amount, int status, int time) {

        this.invalidate(this.getSelectedIndex());
        return super.moveFocus(amount, status, time);

    }

    public void onFocus (int direction) {

        super.onFocus(direction);

    }

    protected void onUnFocus () {

        this.invalidate(this.getSelectedIndex());

    }

    public void refresh () {

        this.getManager().invalidate();

    }

    public void drawListRow (ListField listField, Graphics graphics, int index, int y, int w) {

        ListRander listRander = (ListRander)_listData.elementAt(index);
        graphics.setGlobalAlpha(255);
        graphics.setFont(Font.getDefault().getFontFamily().getFont(Font.PLAIN, 24));
        final int margin =5;

        final Bitmap thumb= listRander.getListThumb();
        final String listHeading = listRander.getListTitle();
        final String listDesc= listRander.getListDesc();
        final String listDesc2= listRander.getListDesc2();
        final Bitmap nevBar = listRander.getNavBar();

        //list border
        graphics.setColor(Color.BLACK);
        graphics.drawRect(0, y, w, _MAX_ROW_HEIGHT);

        graphics.drawBitmap(margin, y+margin+10, thumb.getWidth(), thumb.getHeight(), thumb, 0, 0);

        graphics.drawText(listHeading, 3*margin+thumb.getWidth(), y+margin);
        graphics.setColor(Color.BLACK);

        graphics.drawText(listDesc, 3*margin+thumb.getWidth(), y+ margin+30);
        graphics.drawText(listDesc2, 3*margin+thumb.getWidth(), y+ margin+60);

    }

    public Object get(ListField listField, int index) {

        String rowString = (String) _listData.elementAt(index);
        return rowString;

    }

    public int indexOfList (ListField listField, String prefix, int start) {

        for (Enumeration e = _listData.elements(); e.hasMoreElements(); ) {

            String rowString = (String) e.nextElement();
            if (rowString.startsWith(prefix)) {

                return _listData.indexOf(rowString);

            }

        }

        return 0;

    }

    public int getPreferredWidth(ListField listField) {

        return 3 * listField.getRowHeight();

    }

}

Listrander.Java

public class ListRander {}

private bitmap listThumb = null;
incognito bar Bitmap = null;
private String listTitle = null;
private String listDesc = null;
private String listDesc2 = null;

public ListRander (Bitmap listThumb, String listTitle, String listDesc, String listDesc2, Bitmap navBar) {}
this.listDesc = listDesc;
this.listDesc2 = listDesc2;
this.listThumb = listThumb;
this.listTitle = listTitle;
this.navBar = bar navigation;
}
public getListThumb() {Bitmap image
Return listThumb;
}
{} public void setListThumb (listThumb Bitmap)
this.listThumb = listThumb;
}
public getNavBar() {Bitmap image
return the navigation bar;
}
{} public void setNavBar (navigation bar of the Bitmap)
this.navBar = bar navigation;
}
public String getListTitle() {}
Return listTitle;
}
{} public void setListTitle (String listTitle)
this.listTitle = listTitle;
}
public String getListDesc() {}
Return listDesc;
}
{} public void setListDesc (String listDesc)
this.listDesc = listDesc;
}
public String getListDesc2() {}
Return listDesc2;
}
public void setListDesc2 (String listDesc2) {}
this.listDesc2 = listDesc2;
}
}

You seem to have two problems here and are confusing them.  You must break the problem into two parts

(1) extract the data from the entry and create the objects you want to display

2) display in a list, a set of objects.

Let's get the sorted first premiera.

I will suggest what to do here, but in practice, you might actually think about this yourself as part of the design phase of your application.  You should do this, not me, because then you will have all the information available.  At the present time, I have just what you said, which is not much.  So maybe what I'm telling you is not correct for your application.  Only you can decide that.  And be blunt here, you should have decided this before you start coding.  Do you want you could lead down the wrong path.  You must think of your application as a home - as the architect must design all the rooms, and how they will be built, before you start building the House.  You do not, then we are building the rooms on the fly.  Who knows if they will be fit at home?

In this case, I think you need to create an object that represents each of the elements in the internal array of new data.  call this object

NewsItem

This object will have attributes, such as its title, content, date, the linked image and so on, each of whom have will get and set methods.  While you treat each inner element fetch you the associated entry and update the object.

When you have finished the inner loop of processing, you now have a complete

NewsItem

Object, so you will add it to a collection, an array of NewsItem objects, call this _newsItems.  You will create it at the beginning - you know how many entries it takes because it is the number of entries in your outdoor table.

So before you start to deal with JSON, create your table and the 'index' value of 0.

Once you have created your Newsitem, add this in the table to the position 'index' and increment "index".

And once you have analyzed all the JSON, you will have a complete picture.  This is part 1 finished!

And note in your drawListRow, you are given a clue - that is the index in your tables in _newsItems.  So you can easily find which entry to view and display it correctly.  But it is part 2 and is a separate issue.

Tags: BlackBerry Developers

Similar Questions

  • The location of the custom metadata fields

    I'm trying to locate the custom metadata fields. Consider a custom metadata field where his dname = xPracticeWork and dCaption = practical work.

    I am trying to locate it using the old way.

    When to activate the settings regional french user and see this metadata field appears in English.When I turn on the location in the information system Audit, it is said

    unable to find string 'fr.Practice Work'

    So I tried including < @fr. The practice of work =Work practice@ >

    but he throws and error message saying unknown resource definition tag

    If I do the dCaption as PracticeWork and try to < @fr. PracticeWork =Work practice@ > it works absolutely well.

    It seems that the practical work being two letter word definition tag allows no space.

    Can someone please help me on this.


    Thank you

    Vanina

    It's very simple, you write a string that you want to display in the form of legend (I use this trick in the profiles, if I want to rename a metadata custom field exist for the type having a different meaning), or write you a string Id cannot contain spaces, which solved somewhere, usually a custom - component see what thread change location String for details how to create a resource exploitation translations.

  • Problem with custom VerticalFieldManager, custom list field Call Back

    I created a custom vertical field Manager and a custom list field. It works very well in JDE 6.0.But when I build the same code in JDE 4.5 it throws the error because the setExtent Sub protected method (int width, int jeight) that I used in my code is final in JDE 4.5.

    so I changed my sublayout custom implemented code in vertical field Manager method. Again, this works very well in JDE 6.0.When I have to generate in JDE 4.5 is not to throw any errors.but when I run my code

    the list field does not have focus.

    I added a text field and a list custom field to the Vertical Field Manager text field focus but custom list field does not receive the focus. And the confusing part is when I click on the arrow to the getSelectedIndex from the scope of the list is changing and when I print listfield is active or not is the wrong impression.

    What is bad code works fine in jde 6.0 but not in jde 4.5, please let me know what I need to do something.

    Me as the ListField focus, but is not in fact poster it seems.  Have you made a

    . getLeafFieldWithFocus()

    to see if indeed he has the focus?

    I think we will have to see the ListField code for help.

  • Someone removed the custom attributes field

    Is it possible that PowerCLI can fire an event if someone removed the field of the custom in vCenter attributes?  I take more precisely on the class in Administration > custom attributes in vSphere client 5.x.  For some reason a field that he had to show VM assignments is missing, and I'll try to find what happened to her.

    Course, use the CustomFieldRemovedEvent.

    You can use the Get-VIEvent or my Get-VIEventPlus cmdlet to retrieve the events.

    BTW use my Event-O-Matic to easily find event names.

    Special Edition, it will still generate code to extract the events

  • Please help me with the custom text field FormCalc

    There is someone online has done a very good thing for me - they helped me create a text field that would be of type 'this document has been printed on _' and include some day the pdf was printed on the employer's intranet site.

    I had a shortcut in my favorites and would click on it and place it on each new document that I needed on.

    Because the computer I was using suddenly fell down, can't get the details of how to set it up again. I have a pdf form that includes the box, but when I open it in LiveCycle, it's just empty.

    That's what I saved:

    < field h = mm "8,4935" name = "PrintedOn" w = "141,0398 mm" x = "-0,0001 mm" y = "0 mm" xmlns ="http://www.xfa.org/schema/xfa-template/2.5/" > ""
    < ui >
    < textEdit >
    < border hand = 'right' presence = "hidden" >
    <? templateDesigner styleId aped0? > < / border >
    < margin / >
    < / textEdit >
    < /UI >
    < police size = cast "18pt" = "Tahoma" weight = "bold" >
    < filling >
    < color value = "221,221,221" / >
    < / filling >
    < / make >
    < para hAlign = "center" vAlign = "middle" / >
    < link match = "none" / >
    < activity = "prePrint" ref = "$host" >
    < script >$ .rawValue = concat ("this document has been printed on:", num2date (date (), DateFmt (1))); < /script >
    < / event >
    < / field >

    I don't remember what to do to get this working.

    I use this text box "print on" ALL the time, and I need to know what to do to get back to work quickly.

    If there is someone who could help me, I could also send you a sample of a form which includes it - so you can see exactly what I mean.

    If someone could remember how to program this kind of thing in once again and save it in LiveCycle, then explain how I can put it on another computer so I'd really, REALLY appreciate it.

    ~ Chris

    PS - this one as I had put in place only prints print message per day on the first page. If she could somehow print on EACH page of the PDF file without me having to click and add it to each page individually, it would be better... but let's first!

    Hello

    The script is here. If you place a new textfield in the Master Page and put the following script in the event of pre-publication of the field:

    $ = concat("This document was printed on: ", num2date(date(), DateFmt(1)))
    

    The language is FormCalc.

    Please note that you don't need to go to the XML Source for this. Simply select the textfield object and open the Script Editor (in the Windows menu). Drag the bottom of the editor bar so that you can see a few lines, and then set the FormCalc language.

    Should work,

    Niall

  • FOCUS ON THE CUSTOM LIST

    I created a CustomListManger of extemding VerticalFieldManager. for lines, I created a CustomRow Manager by extending Mnager.

    When I display the list, I am not able to focus on the CustomRowManager I added. Focusable property is enabled for the CustomRowManager and the CustomListManger.

    Any help is welcome!

    I used the thread below to solve the solution:

    http://supportforums.BlackBerry.com/T5/Java-development/help-focus-on-managers/TD-p/1240859

  • Clear link to the customer list

    Kind of goofy question - how can I clear the list of VC servers and hosts that your client is connected to?  On mine there is a bunch of connections unique to the guests, as well as tips from the lab that doesn't exist anymore - more than 40 points in total!

    I guess that's in a file on my PC, but I can't.

    I think that I found... It is in the registry

    Search for past connections.

  • View the customer issues and external Web page

    We can communicate very well with rdp and PCoIP internally, but externally, all we get is a white screen. I don't see even a connection attempt. I took a separate external IP and forwarded all ports (65 k - 1) this external IP address to our internal connection manager. I read everything you had needed was 90,443,8001,50001,4001, but I forwarded all. Still doesn't seem to work. any ideas?

    (xxx.xxx.xxx.227) -(firewall)-(internal connection server 10.10.10.5)

    | - vmtest 10.10.10.1

    | - vmtest2 10.10.10.2

    You can't tunnel PCOIP via a security server so probably you cannot tunnel through a normal connection either broker.    I've never tried, but since we use all direct connect inside our LAN.

    If you have found this device or any other useful post please consider the use of buttons useful/correct to award points

  • want to turn off highlight the particular list field line, when you click

    Hello

    I have a list of line 3 display, on which I have 2 lines that are highlighted with little color.

    When I click on the particular line, I want to turn off the highlight on this line.

    How can I remove the list and add to the list to turn off highlight the special line, which is which is clicked by the user.

    Concerning

    Antoine Singh

    Hello

    I was able to do

    I have again to call the constructor of the list view by changing the value in the table highlight

    Concerning

    Antoine Singh

  • Fill a field of text according to what is selected in the item list field

    I have a form that contains a ROOM_REF field that is a list item and a ROOM_DESC field that is a text element. (among other things).

    When the user selects in the ROOM_REF area (which is populated by a group of archives at the start),
    I want it to automatically fill in the ROOM_DESC field with data (read-only).

    What type of trigger that I use and with what code?

    Something like:

    SELECT ROOM_DESC FROM ROOM WHERE ROOM_REF =: SESSION. ROOM_REF;

    Thank you

    Have you tried this code in the trigger of WHEN-LIST-list item CHANGE.

    SELECT ROOM_DESC IN: ROOM_DESC OF THE ROOM WHERE ROOM_REF =: SESSION. ROOM_REF;

    -Clément

  • How can you change the name of the custom form fields?

    I made a form that required me to add a few custom fields.  When the form sends an email, custom fields appear as "Custom".  I need them to say what is the form field.  Can we achieve this by Muse?

    I tried to change the name of the script in DreamWeaver, but it caused the form to fail.

    Any ideas would be great.

    Thank you.

    You are not able to just type the new name in and on "Custom" label above it and see it changed in your email automatically?

  • How to view the entries from field text as *?

    Hi all

    I develop a login in the form with the fields username and password, I want to display the entries in password field when running as *?
    for this option in the property palette so that related field?

    for ex:

    password to abcdef

    When running if I get the password abcd I loke

    Password *.

    How to do this?

    change the password item property

    below FUNCTIONAL:

    HIDE the DATA Yes

    Good luck...!

  • Create focus on the custom edit field?

    There's my code to see the login screen...
    I want to create special border editfield when he onFocus? so people place now developed...

    public LoginScreen()
        {
            super( NO_VERTICAL_SCROLL | USE_ALL_HEIGHT | USE_ALL_WIDTH );
            this.getMainManager().setBackground(BackgroundFactory.createLinearGradientBackground(0x0099CCFF,
                    0x0099CCFF,0x009933FF,0x009933FF) );
    
            Bitmap logoEcc = Bitmap.getBitmapResource("ecc.png");           //call image
            BitmapField logo = new BitmapField(logoEcc,Field.FIELD_LEFT);               //make logo side left
            hfm = new HorizontalFieldManager(Field.USE_ALL_WIDTH)           //new horizontalmanager with All Width
            {
                protected void paint(Graphics graphics)
                {
                    graphics.setBackgroundColor(Color.BLACK);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            hfm.add(logo);
            add(hfm);
            add(new SeparatorField());
    
            username = new LabelField("Username", Field.FIELD_LEFT);
            add(username);
    
            usernameEdit = new EditField (Field.USE_ALL_WIDTH)
            {
                protected void paint(Graphics g)
                {
    
                XYEdges padding = new XYEdges(3, 3, 3, 3);
                int color = Color.BLACK;
                int lineStyle = Border.STYLE_SOLID;
                Border roundedBorder2 = BorderFactory.createRoundedBorder(padding, color, lineStyle);
                usernameEdit.setBorder(roundedBorder2);
            //  g.setBackgroundColor(Color.WHITESMOKE);
                g.clear();
                super.paint(g);
            }
            };
            add(usernameEdit);
    
            password = new LabelField("Password", Field.FIELD_LEFT);
            add(password);
    
            passwordEdit = new PasswordEditField ()
            {
                protected void paint(Graphics g)
                {
                    //g.setBackgroundColor(Color.WHITESMOKE);
                    g.clear();
                    super.paint(g);
                    XYEdges padding = new XYEdges(3, 3, 3, 3);
                    int color = Color.BLACK;
                    int lineStyle = Border.STYLE_SOLID;
                    Border roundedBorder2 = BorderFactory.createRoundedBorder(padding, color, lineStyle);
                    passwordEdit.setBorder(roundedBorder2);
                }
            };
            add(passwordEdit);
    
            add(new SeparatorField());
    
            login = new ButtonField("Login",Field.FIELD_HCENTER);
            login.setChangeListener(this);
            add(login);
    

    any solution? Thank you...

    Hello

    EditField ed = new EditField(){protected void drawFocus(Graphics f, boolean value)
    {              graphics.setColor(Color.BLUE);                 int width = getPreferredWidth();                 int height = getPreferredHeight();                 //Draw a border around the field.                 graphics.fillRect(0, 0, 3, height); //Left border                 graphics.fillRect(0, 0, width, 3); //Top border                 graphics.fillRect(width-3, 0, 3, height); //Right border                 graphics.fillRect(0, height-3, width, 3); //Bottom border
    
    }};
    
    
    

    Write like this...

  • Add the custom user field / Module URL + 1 case report

    Hello

    I'm trying to get this BC online form to work.

    I have a content module support and this is a request for information form which can be seen here

    http://www.eco-cabins.com.au/information-request?cabin=1%20Room%20with%20No%20Bath % 20Quee % 20Bed % 20and % 20Queen % 20Bunker % 20Bed n

    As you can see, the {module_url, cabin} works well 1 room without bathroom, Queen bed and one bed Queen Size Bunker

    on the page but is not his way to the record of the case.

    This is the HTML code: http://pastebin.com/HVmRNpNm

    When someone enters a case the cabin field ends up being empty as you can see in the following image. I would like to display what they are on the page. For example: 1 room with no bath, Queen bed and a Queen-size Bunker bed

    SafariScreenSnapz002.png

    Essentially, I would like to identify what page they are on to identify what cabin they are curious.

    Any help would be appreciated. I had a look to the tutorials and videos but still questions. Thank you

    Thank you, the information is displayed in the case... However,.

    It appears on the page of people with a request for information:

    That's what I used:

    Too bad. I fixed it with

    {module_url, cabin}

  • custom list field

    Hi, I work with list filed, I need to customize the field List, I'll explain a little more. I have this picture.

    I get the list of applications installed with codemodule feeder and now I want to show that, in the list, as you can see in the picture.you above can see the lock in the dark peak, I need to customize this pic with onclick.
    I mean when I click on any line I want to delete this pic of lock in the dark of that line clicked in the list filed
    and when I click again on the same line I want to insert this pic of lock in the same row.
    I think I need to call the drawListRow method in the onclick or sonething else? Please guide me
    Here's the code I used

    public final class MyScreen extends MainScreen {
    
        CustomListField myListView;
    
        public MyScreen() {
    
            Bitmap listThumb = Bitmap.getBitmapResource("icon.png");
            String listTitle="Headline";
            String listDesc = "Mobile news feeds";
            String listDesc2 = " ";
            final Bitmap navBar = Bitmap.getBitmapResource("lock.png");
            Vector v = new Vector();
            for(int i=0; i<30; i++){
                v.addElement(new ListRander(listThumb, listTitle, listDesc,listDesc2, navBar));
            }
            //v.addElement(new ListRander(listThumb, listTitle, listDesc,listDesc2, navBar));
    
            myListView = new CustomListField(v){
    
                protected boolean trackwheelClick (int status, int time) {
    
                    Dialog.alert(" You have selected :" + getSelectedIndex());
    
                    return super.trackwheelClick(status, time);
                }
            }
            ;
            add(myListView);   
    
        }
    }
    
    package mypackage;
    
    import net.rim.device.api.system.Bitmap;
    
    public class ListRander {
    
        private Bitmap listThumb= null;
        private Bitmap navBar = null;
        private String listTitle=null;
        private String listDesc= null;
        private String listDesc2= null;
    
        public ListRander(Bitmap listThumb,String listTitle, String listDesc, String listDesc2, Bitmap navBar) {
            this.listDesc = listDesc;
            this.listDesc2 = listDesc2;
            this.listThumb = listThumb;
            this.listTitle = listTitle;
            this.navBar = navBar;
        }
        public Bitmap getListThumb() {
            return listThumb;
        }
        public void setListThumb(Bitmap listThumb) {
            this.listThumb = listThumb;
        }
        public Bitmap getNavBar() {
            return navBar;
        }
        public void setNavBar(Bitmap navBar) {
            this.navBar = navBar;
        }
        public String getListTitle() {
            return listTitle;
        }
        public void setListTitle(String listTitle) {
            this.listTitle = listTitle;
        }
        public String getListDesc() {
            return listDesc;
        }
        public void setListDesc(String listDesc) {
            this.listDesc = listDesc;
        }
        public String getListDesc2() {
            return listDesc2;
        }
        public void setListDesc2(String listDesc2) {
            this.listDesc2 = listDesc2;
        }
    }
    
    package mypackage;
    
    import java.util.Enumeration;
    import java.util.Vector;
    
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.XYRect;
    import net.rim.device.api.ui.component.ListField;
    import net.rim.device.api.ui.component.ListFieldCallback;
    
    public class CustomListField extends ListField implements ListFieldCallback {
    
        private Vector _listData;
        private int _MAX_ROW_HEIGHT = 60;
        public CustomListField (Vector data) {
    
            _listData = data;
            setSize(_listData.size());
            setSearchable(true);
            setCallback(this);
            setRowHeight(_MAX_ROW_HEIGHT);
    
        }
    
        protected void drawFocus (Graphics graphics, boolean on) {
    
            XYRect rect = new XYRect();
            graphics.setGlobalAlpha(150);
            graphics.setColor(Color.BLUE);
            getFocusRect(rect);
            drawHighlightRegion(graphics,HIGHLIGHT_FOCUS,true,rect.x,rect.y,rect.width,rect.height);
    
        }
    
        public int moveFocus (int amount, int status, int time) {
    
            this.invalidate(this.getSelectedIndex());
            return super.moveFocus(amount, status, time);
    
        }
    
        public void onFocus (int direction) {
    
            super.onFocus(direction);
    
        }
    
        protected void onUnFocus () {
    
            this.invalidate(this.getSelectedIndex());
    
        }
    
        public void refresh () {
    
            this.getManager().invalidate();
    
        }
    
        public void drawListRow (ListField listField, Graphics graphics, int index, int y, int w) {
    
            ListRander listRander = (ListRander)_listData.elementAt(index);
            graphics.setGlobalAlpha(255);
            graphics.setFont(Font.getDefault().getFontFamily().getFont(Font.PLAIN, 24));
            final int margin =5;
            final Bitmap thumb= listRander.getListThumb();
            final String listHeading = listRander.getListTitle();
            final String listDesc= listRander.getListDesc();
            final String listDesc2= listRander.getListDesc2();
            final Bitmap nevBar = listRander.getNavBar();
            //list border
            graphics.setColor(Color.BLACK);
            graphics.drawRect(0, y, w, _MAX_ROW_HEIGHT);
    
            //thumbnail border & thumbnail image
            graphics.setColor(Color.BLACK);
            graphics.drawRoundRect(margin-2, y+margin-2,thumb.getWidth()+2, thumb.getHeight()+2, 5, 5);
            graphics.drawBitmap(margin, y+margin, thumb.getWidth(), thumb.getHeight(), thumb, 0, 0);
    
            //drawing texts
           // graphics.setFont(FontGroup.fontBold);
            graphics.drawText(listHeading, 2*margin+thumb.getWidth(), y+margin);
            graphics.setColor(Color.BLACK);
    
            // graphics.setFont(FontGroup.smallFont);
            graphics.drawText(listDesc, 2*margin+thumb.getWidth(), y+ margin+20);
            graphics.drawText(listDesc2, 2*margin+thumb.getWidth(), y+ margin+32);
    
            //draw navigation button
            final int navBarPosY = y+(_MAX_ROW_HEIGHT/2 - nevBar.getHeight()/2);
            final int navBarPosX = Graphics.getScreenWidth()- nevBar.getWidth()+ margin;
            graphics.drawBitmap(navBarPosX-10, navBarPosY, nevBar.getWidth(), nevBar.getHeight(), nevBar, 0 , 0);
    
        }
    
        public Object get(ListField listField, int index) {
    
            String rowString = (String) _listData.elementAt(index);
            return rowString;
    
        }
    
        public int indexOfList (ListField listField, String prefix, int start) {
    
            for (Enumeration e = _listData.elements(); e.hasMoreElements(); ) {
    
                String rowString = (String) e.nextElement();
                if (rowString.startsWith(prefix)) {
    
                    return _listData.indexOf(rowString);
    
                }
    
            }
    
            return 0;
    
        }
    
        public int getPreferredWidth(ListField listField) {
    
            return 3 * listField.getRowHeight();
    
        }
    
    }
    

    When I click on the particular line of the list, lock on the right side image should disappear. When I click again on the same line in the list, it should appear again.
    something as in this link
    http://StackOverflow.com/questions/8222635/how-to-display-and-hide-an-image-in-list-on-clicking-on-i...

Maybe you are looking for

  • Question about USB mouse help

    Can you get it someone please let me know if all precautions must be taken when using a mouse; usually is it necessary to exercise caution while connecting and removing the mouse from the USB port.From now on, the mouse is detected automatically and

  • AirPrint on HP officejet Pro 8500 A909G

    Is it possible to use AirPrint on a HP Officejet Pro 8500 A909g? Thank you

  • My computer is no longer completely after automatic update starts...

    My computer is more fully boots after automatic update... message is as follows taken windows... for options and advanced boot troubleshooting for windows, press f8 it will not do anything! Help

  • Slow internet connection on my Vista computer

    I am running Windows Vista on my computer and I spoke with rogers my ISP to check if I have good connection and they said that I have a good signal with them but when I go online, internet takes forever and it's very slow. Can anyone help?

  • Re-apply Anytime Upgrade license after running recovery disk

    4 years ago, I bought a Toshiba laptop with Windows Home Premium pre-installed, and provided with a Toshiba recovery media. As I need to join a domain but wanted to keep the media center software that I used also provided Express Upgrade disk to upgr