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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:36:10+00:00 2026-06-13T22:36:10+00:00

my goal is to create a star field like in android they have a

  • 0

my goal is to create a star field like in android they have a rating star field. I have come as far to accomplish the following:

  • create the star fields (5)
  • when clicked, bitmap changes.
  • When “Unclicked” bitmap changes back to default.

My next step is to do the following:
if star 1 is not clicked then all 4 stars after must not be clickable, if star 2 is clicked then star 3 must be clickable and stars 4-5 must not be clickable, (and then backwards) if all 5 stars have been selected only star5 must be clickable, if star 5 and 4 are unclicked then star3must be clickable stars 2-1 must not be clickable, etc.

I can supply you with a code snippet(check link) with what I have done so far:
http://supportforums.blackberry.com/t5/Java-Development/Rating-Stars-like-in-android/m-p/1942559

Please let me know if you have any idea on how to do what I would like to achieve , 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-13T22:36:12+00:00Added an answer on June 13, 2026 at 10:36 pm
    LabelField RateDeal = new LabelField("Rating: ");
        HorizontalFieldManager StarManager=new HorizontalFieldManager(USE_ALL_WIDTH);
        final Bitmap StarNotClicked = Bitmap.getBitmapResource("rating_star.png");
        final Bitmap StarClicked = Bitmap.getBitmapResource("rating_star_focus.png");
    
        Star1 = new BitmapField(StarNotClicked,BitmapField.FOCUSABLE){
            protected boolean navigationClick(int status, int time){
                fieldChangeNotify(1);
                Star1.setBitmap(StarClicked);
                Star2.setBitmap(StarNotClicked);
                Star3.setBitmap(StarNotClicked);
                Star4.setBitmap(StarNotClicked);
                Star5.setBitmap(StarNotClicked);
                AmountOfStarsSelected(1);
                return true;
            }
        };
        Star2 = new BitmapField(StarNotClicked,BitmapField.FOCUSABLE){
            protected boolean navigationClick(int status, int time){
                fieldChangeNotify(1);
                Star1.setBitmap(StarClicked);
                Star2.setBitmap(StarClicked);
                Star3.setBitmap(StarNotClicked);
                Star4.setBitmap(StarNotClicked);
                Star5.setBitmap(StarNotClicked);
                AmountOfStarsSelected(2);
                return true;
            }
        };
        Star3 = new BitmapField(StarNotClicked,BitmapField.FOCUSABLE){
            protected boolean navigationClick(int status, int time){
                fieldChangeNotify(1);
                Star1.setBitmap(StarClicked);
                Star2.setBitmap(StarClicked);
                Star3.setBitmap(StarClicked);
                Star4.setBitmap(StarNotClicked);
                Star5.setBitmap(StarNotClicked);
                AmountOfStarsSelected(3);
                return true;
            }
        };
        Star4 = new BitmapField(StarNotClicked,BitmapField.FOCUSABLE){
            protected boolean navigationClick(int status, int time){
                fieldChangeNotify(1);
                Star1.setBitmap(StarClicked);
                Star2.setBitmap(StarClicked);
                Star3.setBitmap(StarClicked);
                Star4.setBitmap(StarClicked);
                Star5.setBitmap(StarNotClicked);
                AmountOfStarsSelected(4);
                return true;
            }
        };
        Star5 = new BitmapField(StarNotClicked,BitmapField.FOCUSABLE){
            protected boolean navigationClick(int status, int time){
                fieldChangeNotify(1);
                Star1.setBitmap(StarClicked);
                Star2.setBitmap(StarClicked);
                Star3.setBitmap(StarClicked);
                Star4.setBitmap(StarClicked);
                Star5.setBitmap(StarClicked);
                AmountOfStarsSelected(5);
                return true;
            }
        };
        StarManager.add(Star1);
        StarManager.add(Star2);
        StarManager.add(Star3);
        StarManager.add(Star4);
        StarManager.add(Star5);
            add(StarManager);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a netflix-like 5 star review ratings. The goal is to have a
The goal is to create a mock class which behaves like a db resultset.
My goal is to create something like 1Up.com has where website viewers gain Experience
I'd like to create a custom control in javascript. The goal is to create
Possible Duplicate: Ruby.Metaprogramming. class_eval I have this little project, the goal is to create
My goal is to create a curved arrow like this one, on an html5
My goal is to create a validated IP address field that will be validated
My goal is to create a subversion repository with the following layout project Template
My goal is to create a caret browsing extension in google chrome. I have
Goal: Create Photomosaics programmatically using .NET and C#. Main reason I'd like to do

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.