Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 19,623
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem in screen transition

As noted, "I wanted you to figure this out yourself".  What do you think from the documentation?  What happens in your testing? 

 

What I think is irrelevant, the code is not going out with my name on it!

Developer
Posts: 151
Registered: ‎09-28-2012
My Device: Blackberry Developer
My Carrier: Aircel

Re: Problem in screen transition

your subject is differ from the matter you have wrote in message body,,,

 


----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Forums Advisor I
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Problem in screen transition

public UiAppScreen()
    {
       
        field1 = new BitmapField(i1,BitmapField.FOCUSABLE);
        field2 = new BitmapField(img2,BitmapField.FOCUSABLE);
        field3 = new BitmapField(img3,mgBitmapField.FOCUSABLE);
        field4 = new BitmapField(img4,BitmapField.FOCUSABLE);
      
       
   
        final HorizontalFieldManager m2= new HorizontalFieldManager(Manager.USE_ALL_WIDTH| Manager.HORIZONTAL_SCROLL)
        {
            protected void paint(Graphics graphics)
            {
                super.paint(graphics);
                graphics.drawBitmap(getHorizontalScroll(), 0, displayWidth, displayHeight, img5, 0, 0)               
            }
        };
       
       
        m2.add(field1);
        m2.add(field2);
        m2.add(field3);
        m2.add(field4);
       
        add(m2);
    }

 

 

I am getting the image on the top of the background image but i have to tap every time.

    Timer game_time;
    TimerTask countdown;
    int timestop=5;
    
    public UiAppScreen(final Graphics graphics)
    {
       
       
        super();
           
            game_time = new Timer();
            countdown = new TimerTask(){
               
                public void run() {

                          timestop--;
                       
                          String time_out = "" + timestop;

                          graphics.setColor(Color.WHITE);
                          graphics.fillRect(230, 5, 50, 30);
                          graphics.setColor(Color.DODGERBLUE);
//                          graphics.setFont(myFont_18);
                       
                          graphics.drawText(time_out, 230,10);

                          }

            };
           
           
            game_time.scheduleAtFixedRate(countdown, 500, 1000);

            }
    }