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 8183297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:06:58+00:00 2026-06-07T01:06:58+00:00

I’m creating a BlackBerry application, and now I want to present an animation when

  • 0

I’m creating a BlackBerry application, and now I want to present an animation when I click on an image button. In my application, I use a splash screen, and after that a login page is shown. When I click on my login page’s submit button, a home screen is displayed, and there I want to show a slide animation.

This is my code:

public class LoginPage extends MainScreen implements FieldChangeListener {

      public TextField tf_username;
      public TextField tf_password;     
      private Bitmap[] img1;    
      public LabelField labeluser;  
      public LabelField labelpass;  
      public static String strUsername = "";    
      public static String strPassword = "";    
      public CheckboxField objRemembercheckbox;     
      private ImageButton btn_login;    
      private ImageButton btn_clear;    
      public BitmapField loading = new BitmapField(Bitmap.getBitmapResource("login-bar.png"));
      public H_FieldManager hfm_btn;
      public VerticalFieldManager vfm_user, vfm_pass; 
      public PleaseWaitPopupScreen waitPopupScreen = null;  
      public VerticalFieldManager vfmMainManager;   
      public static boolean loginFlag = false; 
      public static boolean flagOutletButton;
      public RecordStore objLoginRecordStore;
      private String login_record_Store_Name = "LoginRMS";

    public LoginPage() {        // TODO Auto-generated constructor stub         super(USE_ALL_WIDTH | USE_ALL_HEIGHT);      setTitle(loading);
                try {
                        Background bg = BackgroundFactory.createSolidTransparentBackground(
                    Color.BLUE, 100);           getMainManager().setBackground(bg);
                    } catch (Exception e) {             // TODO: handle exception       }

        labeluser = new LabelField("Enter Username : ", Field.FIELD_LEFT);      labeluser.setMargin(10, 0, 0, 10);      labeluser.setColor(Color.BLACK);

        tf_username = new TextField(TextField.TYPE_PLAIN, Field.FIELD_HCENTER);

        labelpass = new LabelField("Enter Password : ", Field.FIELD_LEFT);      labelpass.setMargin(10, 0, 0, 10);      labelpass.setColor(Color.BLACK);

        tf_password = new TextField(TextField.TYPE_PASSWORD,
                Field.FIELD_HCENTER);

        objRemembercheckbox = new CheckboxField("Remember Me", false);      objRemembercheckbox.setMargin(10, 0, 0, 10);

                img1 = new Bitmap[3];       img1[0] = Bitmap.getBitmapResource("btn-hover.png");        img1[1] = Bitmap.getBitmapResource("btn.png");      img1[2] = Bitmap.getBitmapResource("btn.png");

        btn_login = new ImageButton(img1, "Login", Field.FIELD_LEFT);       btn_login.setColor(Color.WHITE);        btn_clear = new ImageButton(img1, "Clear", Field.FIELD_RIGHT);      btn_clear.setColor(Color.WHITE);

        hfm_btn = new H_FieldManager(btn_login, btn_clear, true,
                Field.FIELD_HCENTER);       vfm_user = new VerticalFieldManager();      vfm_user.add(labeluser);        vfm_user.add(tf_username);

        vfm_pass = new VerticalFieldManager();      vfm_pass.add(labelpass);        vfm_pass.add(tf_password);      add(vfm_user);      add(vfm_pass);      add(objRemembercheckbox);       add(hfm_btn);

        btn_login.setChangeListener(this);      btn_clear.setChangeListener(this);

    }

    public void fieldChanged(Field field, int context) {        // TODO Auto-generated method stub      if (field == btn_clear) {           tf_username.setText(" ");           tf_password.setText(" ");

        } else if (field == btn_login) {            login();        }

    }


public void login() {

        try {

            LoginPage.strUsername = tf_username.getText().toString();           System.out.println("strUsername==" + strUsername);          LoginPage.strPassword = tf_password.getText().toString();           System.out.println("strPassword==" + strPassword);

            if (strUsername.length() == 0 || strPassword.length() == 0
                    || strUsername == null || strPassword == null) {
                Dialog.alert("You must enter credentials");
                invalidate();           } else {

                // strUsername=username.getText();
                // strPassword=password.getText();

                try {

                    waitPopupScreen = new PleaseWaitPopupScreen("Please wait..");
                    UiApplication.getUiApplication()
                            .pushScreen(waitPopupScreen);
                    new Thread() {
                        public void run() {
                            ConnectToServer objConnectToServer = new ConnectToServer();


                            loginFlag = objConnectToServer.loginCheck(
                                    strUsername, strPassword);

                            UiApplication.getUiApplication().invokeLater(
                                    new Runnable() {
                                        public void run() {
                                            UiApplication.getUiApplication()
                                                    .popScreen(waitPopupScreen);

                                            if (loginFlag == true) {
                                                LoginPage.flagOutletButton = false;
                                                System.out
                                                        .println("Calling getOutletInfo");

                                                HomeScreen objHome= new HomeScreen ();
                                                UiApplication
                                                        .getUiApplication()
                                                        .pushScreen(objHome);

                                            }

                                            else {
                                                Dialog.alert("Username Or Password Is Incorrect");

                                            }

                                        }

                                    });
                        };
                    }.start();

                    // ConnectToServer objConnectToServer=new ConnectToServer();
                    //
                    // loginFlag=objConnectToServer.loginCheck(strUsername,
                    // strPassword);

                    System.out.println("loginFlag==" + loginFlag);

                } catch (Exception e) {
                    // TODO: handle exception
                    e.printStackTrace();
                }

            }

        } catch (Exception e) {             // TODO: handle exception           e.printStackTrace();        }

    }

  }

Please suggest how to implement the slide animation.

Thank you.

  • 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-06-07T01:07:00+00:00Added an answer on June 7, 2026 at 1:07 am

    Try following links:

    TransitionContext – The TransitionContext class contains all the necessary data to
    uniquely describe a transition animation between two screens.

    BlackBerry Screen Transition Sample Code

    BlackBerry Java Application Screen Transitions – Sample Application Overview

    Creating a screen transition Code sample

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

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.