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

  • SEARCH
  • Home
  • 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 6764779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:38:01+00:00 2026-05-26T14:38:01+00:00

I have listfield which contains several rows. It is working fine when i am

  • 0

I have listfield which contains several rows.
It is working fine when i am using in blackberry torch(I can scroll the listfield and can select(click) any row).
But the same application when i am using for blackberry storm 9500 I can not scroll because as soon as i am trying to scroll the row is getting selected(click).please tell me the reason why it is happening or the way to use listfield in storm

thank you

My lisfield class is

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.system.Display;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.XYRect;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.ListField;
import net.rim.device.api.ui.component.ListFieldCallback;

  public class SpeakersList implements ListFieldCallback
{
    private String[] products;
    private int rgb=Color.BLACK;
    Bitmap arraow;
    Bitmap placeholder;
    Bitmap holder[];
    int i=0;
    ImageLoad load;
    public Bitmap _bmap;
    ListField listField;
    TaskWorker taskWorker;
public SpeakersList(String[] products)
{
    this.products=products;
    arraow= Bitmap.getBitmapResource("arrow.png");
    DynamicImages images=new DynamicImages();
    placeholder=Bitmap.getBitmapResource(images.defaultimage);
    holder=new Bitmap[QandAScreen.imglist.length];
    taskWorker = new TaskWorker();
    taskWorker.addTask(new ImageDowload());
}

public void drawListRow(ListField listField, Graphics graphics, int index,
        int y, int width)
{
    this.listField=listField;
    final String text=(String) get(listField, index);
    if (graphics.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS))
    {
    if(holder[index]==null)
    {
    holder[index]=placeholder;
    }
    graphics.setColor(0xC0C0C0);
    graphics.fillRect(0,y+0,480,59);
    graphics.setColor(rgb);
    graphics.setFont(Utility.getBigFont(15));
    graphics.drawBitmap(3,y+7,placeholder.getWidth(), placeholder.getHeight(),holder[index], 0, 0);
    graphics.drawText(text,70,y+20);  
    if(Display.getWidth()==480){
    graphics.drawBitmap(460,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
    }
    else if(Display.getWidth()==360)
    {
        graphics.drawBitmap(330,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
    }
    else
    {
    graphics.drawBitmap(300,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
    }
    graphics.drawLine(0, y+59, Display.getWidth(), y+59);
    }
    else
    {
        if(holder[index]==null)
        {
        holder[index]=placeholder;
        }
        graphics.setColor(rgb);
        graphics.setFont(Utility.getBigFont(15));
        graphics.drawBitmap(3,y+7,placeholder.getWidth(), placeholder.getHeight(),holder[index], 0, 0);
        graphics.drawText(text,70,y+20);  
        if(Display.getWidth()==480){
            graphics.drawBitmap(460,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
            }
        else if(Display.getWidth()==360)
        {
            graphics.drawBitmap(330,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
        }
            else
            {
            graphics.drawBitmap(300,y+20,arraow.getWidth(), arraow.getHeight(),arraow, 0, 0);
            }
        graphics.drawLine(0, y+59, Display.getWidth(), y+59);
    }
}
public Object get(ListField listField, int index)
{
    return products[index];
}

public int getPreferredWidth(ListField listField)
{
    return Display.getWidth()+10;
}
public int indexOfList(ListField listField, String prefix, int start)
{
    return -1;
}

class ImageDowload extends Task
{
    void doTask()
    {


   for(;i<QandAScreen.imglist.length;i++)
   {
        String imgpath=QandAScreen.imglist[i];
         if(imgpath==null || imgpath.length()==0)
         {
          continue;
         }
        load=new  ImageLoad(QandAScreen.imglist[i]+Const.getExtra());
        if(load.getData()!=null)
        {
            UiApplication.getUiApplication().invokeLater(new Runnable() 
            {
                public void run()
                {

                    _bmap=load.getBitmap(40,40);
                    listField.invalidate(i-1);
                    holder[i-1]=_bmap;


               }
            });



        }
   }

    }
}
}
  • 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-05-26T14:38:02+00:00Added an answer on May 26, 2026 at 2:38 pm

    Are you testing with the simulators or real devices? If my memory serves, the 9500 Storm uses the SureClick -display, where the display actually has a small microswitch underneath it, so it can detect touch and clicking (pressing the display) as separate actions. In the simulator, you need to use right mouse button to simulate touch and left to simulate click (or was it the other way around?). Torch (9800) hasn’t got the SureClick-thingamabob, so the list can be scrolled with both right and left mouse buttons in the simulator (although they did have some distinction, other worked as touch and other sends continuous ‘taps’ to the screen or something).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a jsp page which contains the code which prints all files in
I'm writing a Blackberry app. I have a custom list field where I can
I can't find solution for the following problem. I have custom list field, which
Have just started using Google Chrome , and noticed in parts of our site,
I have a User class which has a List field namely pt. This field
I have a sqlite .db file which consists of data in string, int and
I have a folder in which continuously new files are being dumped.In Java,what is
I have to test a program which takes one input file. I have put
I am testing a parser I have written in Scala using ScalaTest. The parser

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.