How to make the decrement on listField list?

IM create code like this:

public class ScreenList extends MainScreen implements ListFieldCallback{
    String x[];
    ListField list;
    public ScreenList(){
        String arr[] ={"1", "2","3","4","5","6"};
        list = new ListField();

        int length = arr.length;
        x = new String[ length];
        for(int i=length-1; i>=0; i--){
            x[i]=arr[i];
            //add(new LabelField(arr[i]);
        }
        list.setSize(length);
        list.setCallback(this);
        this.add(list);
    }

    public void drawListRow(ListField arg0, Graphics arg1, int index, int y,
            int width) {
        // TODO Auto-generated method stub
        arg1.drawText(x[index], 0, y);

    }

If I always try on Simulator Simulator print 1,2,3,4,5,6, but if I try to print to new Label 6,5,4,3,2,1 result

My question... How to make the decrement with listField list implements reminder? Thanks in advance...

Oops sorry correction instead of length use length - 1

Tags: BlackBerry Developers

Similar Questions

  • How to make the lines selectable listfield, when the list has been added to a dialog box

    Hello

    I added a listfield to a dialog box. Now I want that when I click on a line any of this list field, I should get a menu (i.e. something should be available for me so that I can perform an action on the selected line). But when I click on the line, nothing happens.

    Help, please

    Create your own screen, its less than the actual display dimensions to make it look like a pop-up screen. When a line is selected/clicked, call makeMenu.

  • How to make the menu drop-down list with a scroll bar

    Hello

    I have a drop-down list that is filled with different table sizes.

    I have a size of 30-element array.  Some of the last items just go off the screen at the bottom of the Simulator PB.

    Is it possible for me to add a drop-down scroll bar?

    DP = new DropDown();
    dp.rowHeight = 24;
    DP.prompt = "stuff";
    DP. Height = 34;
    DP.width = 230;
    DP.x = TitleTB.x + 170;
    DP.y = Title.y-3;
    addChild (dp);

    Some of the tables look like this-

    case 'List 1':
    dp.rowCount = 2;
    for (var i: int = 0; i<2;>
    {
    if(i==0)
    {
    DPP.splice (0);
    DPP.unshift({label:"blahblah"});)
    }
    else if (i == 1) {}
    DPP.unshift({label:"foofoo"});)
    }
    }
    dp.dataProvider = new DataProvider (dpp);
    addChild (dp);
    break;

    case "List2":
    dp.rowCount = 30;
    for (var n: int = 0; n<30;>
    {
    if(n==0)
    {
    DPP.splice (0);
    DPP.unshift({label:"lalalala"});)
    }
    Else if (n == 1) {}

    **********

    Delete the existing table using splice (0);

    then I add the new array of labels.

    Before, when I didn't have the splice (0), I only had the .unshift () and sometimes got bays combined together and a scroll bar appears automatically in the Simulator.  But then the berries were mixed.

    Thanks for the help!

    Hey mlin13,

    from the looks of it, your property rowCount is set too high. the rowCount property represents the number of lines displayed on the screen when the drop down menu is open. so if the number of rows is less than the amount of items on the list, it will create a scroll bar with a drop-down list for you. try to set the number of lines to a default value of 10 and and keep it manipulate your list from there. and see if you get the desired results. Good luck!

  • How to make the top sites page appears when I open a new tab? Why have I not of "buttons" to pin a top site of the page tab?

    When I open a new tab, NO best sites don't show up... shows just a search engine box. I have Firefox 33.0. Why is there no 'pin' button when I opened a new page? How to make the top sites page appears when I open a new tab?

    Here is some additional information on the configuration of the new tab page:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste newtab and make a pause so that the list is filtered

    (3) double-click the preference browser.newtab.url and enter your favorite page:

    • (Default) page thumbnails = > subject: newtab
    • Blank tab = > subject: empty
    • Built-in Firefox homepage = > topic: welcome
    • Any other page = > full URL of the page

    Press Ctrl + t to open a new tab and check that it worked. Fixed?

    Some traps:

    If Firefox will not let you change this setting: you can have what is called SearchProtect on your system.

    Firefox if allows you to save your changes, but he doesn't know: one of your extensions may be the substitution of her. You can consult, disable and/or remove extensions on the addons page:

    "3-bar" menu button (or tools) > Add-ons > in the left column click on Extensions

    If the modification works during your session, but during the next startup is leads to: you could have a user.js file in your personal settings Firefox (your Firefox profile folder). This article describes how to track down and delete the file: How to fix preferences that will not save.

    A little luck?

  • I have associated my pencil to Apple for the iPad Pro; How to make the Widget of batteries displayed on the notification Center 'today '?

    I have associated my pencil to Apple for the iPad Pro; But how to make the Widget of batteries displayed on the notification Center 'today '?

    See if it works. Scroll to the bottom of the list in the display today. Tap on edit. Press on the + sign next to battery.

  • How to make the text in the header change with scrolling effects?

    Im trying to do a header which changes when you scroll the page. I know how to make the text scrolls and back according to the key position, but his does not work if my key is less than my position of text on the page.

    Ideally, I would like to get so that I scroll to the area of 'Wine', the previous header will slide out and 'Wine' will slide in from the left.

    Any ideas?

    You can try these:

    http://musewidgets.com/products/Parallax-list

    http://musewidgets.com/products/three-box

    Thank you

    Sanjit

  • How to make the text indented in Muse

    How to: make the text back in Muse, as a list with bullets

    Take a look at the thread next - http://forums.adobe.com/message/4896267.

    And the video here - http://tv.adobe.com/watch/muse-feature-tour/adobemuse-create-bullets-in-your-design/.

    Thank you

    Vinayak

  • I want to make the history drop-down list smaller or narrower

    The history list has grown grew so great that it occupies more than half of my screen. How can make the list view more narrow and smaller. Ten points should not have to take half a 19 inch screen.

    Note that you can also place such a CSS code in the file userChrome.css in chrome file in the Firefox profile folder.

    I use code like this:

    /* urlbar - separator */
    #urlbar .dropmarker-icon, #urlbar toolbarbutton {border-left:1px solid ThreeDShadow !important}
    #urlbar-icons image {border-left:1px solid ThreeDShadow !important}
    
    /* urlbar - border */
    .autocomplete-richlistitem {padding-top:2px!important; padding-bottom:2px!important}
    .autocomplete-richlistitem:not(:first-child) {border-top:1px solid #ddd!important}
    .autocomplete-richlistitem[selected="true"] {border-top-color:transparent!important}
    
    • create the chrome (lowercase) folder in the .default profile folder if the folder does not exist
    • Use a text editor like Notepad to create a userChrome.css (new) file in the folder chrome (file name is case sensitive)
    • Paste the code in the userChrome.css file in the Editor window
    • Make sure the userChrome.css file begins with the default line @namespace
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css.
      Otherwise, Windows can add a hidden file .txt extension and you end up with one does not not userChrome.css.txt file

    You can use this button to go to the current Firefox profile folder:

  • Can you please tell me how to make the thicker arrows on the Pages.

    Can you please tell me how to make the thicker arrows on the Pages. Thank you very much. There is something incredibly simple to do, but I, having a disconcerting brain, am totally unable to understand. Please please help me. Thank you

    < re-titled by host >

    Try here > Pages for Mac: Add and edit forms

  • How to make the snow fall go far in the background that I've recently added a newsletter on your part?

    How to make the snow fall go far in the background that I've recently added a newsletter of mozilla to? It appears on things, I feel.

    I can't talk about it. What is an extension?

    You can disable or remove unwanted page extensions modules. Either:

    • CTRL + SHIFT + a
    • Firefox orange (or the Tools menu) button > Add ons

    In the left column, click Extensions. If you don't it spot, perhaps in the appearance section?

  • How to make the text bigger in youtube! Cubs in youtube!

    I made the largest text where google search arrives! But when I go on youtube the text is much tinier and I 65 to cataract and I can't read the text at right! How to make the text bigger in youtube? Thank you very much! I tried everything, but nothing changes the size!

    When you view this page hit {Ctrl + 0} < is a zero number -to reset the zoom level for this area.

    https://support.Mozilla.com/en-us/KB/page+zoom

    If you move the scroll wheel, and are now the CTRL key, you can change the zoom level of the page that is viewed - both in & out.

  • When I run a web browser immediately loaded two blank tabs. How to make the browser to load the only?

    When I run a web browser immediately loaded two blank tabs. How to make the browser to load the only?

    Have you checked the home page to make sure that if is not the vertical bar (|) symbols?

    See the following for a few suggestions:

  • How to make the text darker or bolder

    How to make the text darker or bolder in safari

    shutterbox-

    I'm with you.  Cataract surgery, it will take longer, and the thin, plugged in my humble OPINION, typeface they chose is really for less than 40 eyes.

    The same "BOLD" of the police system capacity would be so appreciated.

    There are 3rd party apps that can change system fonts, and I saw messages claiming success, but I'm a purist to try.

    Small fonts (to us) make it very painful to be here.  I just hope they realize that our needs must be met, as well.

  • S3000-514: how to make the secondary battery to unload everything first?

    Hello world!
    After I ve managed to charge my secondary battery on my laptop (see my previous announcement), I'm now getting another "strange" problem
    With my two batteries in and on the battery the first battery to discharge is the main battery - and not high school!
    This leads to a problem: when I want to change the secondary battery with my combo player, I'm not always have enough power in my battery.
    I have found how to make the battery discharging first of haven´t.
    Can anyone help?

    Hello

    Unfortunately, it is not for me and as much as I know it can not be changed. Probably the electronic power supply is configured to run on this path. Have you tried to remove the main battery and work by simply using secondary? What happens in this case?

  • How to change the location of the @ how to make the Euro symbol and where is 'hash '?

    I am a proud new owner Portege M300. Now all I need? knowledge is:

    -keyboard looks liks the sign @ is above the 2. In fact, it's above the apostrophe, where the quote is true. I want to have the @ sign overcoming the 2 because that's what I'm used to =. How I change these autour?

    -How to make the Euro sign (as £ and $)?

    -Why is£ 3 rather than the 'hash' sign that is posted above? How to make the sign of 'hash '?

    Hello

    Before you can perform any discussion can you please tell me in which country is your laptop bought and what specific keyboard of the country to unity? Each cell has a specific keyboard of the country.

Maybe you are looking for