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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:51:39+00:00 2026-06-06T14:51:39+00:00

I am aggregating numeric ratings (1-5 stars) from a MySQL table containing many entries.

  • 0

I am aggregating numeric ratings (1-5 stars) from a MySQL table containing many entries. It will take the average of the ratings in the column and return it as a variable into Android.

Let’s call the variable $foo.

How do I use $foo to preset the Android RatingBar so that it will programmatically change the number of stars based on the database value?

  • 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-06T14:51:40+00:00Added an answer on June 6, 2026 at 2:51 pm

    Use RatingBar.setRating.

    float foo = 3.5;
    RatingBar bar = (RatingBar) findViewById(R.id.rating_bar);
    bar.setRating(foo);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm aggregating data from one table into another using a query similar to these:
From what I understand, Mashup is aggregating data from separate sources and providing a
I'm aggregating content from a few external sources and am finding that some of
I'm working on a project which involves aggregating data from a variety of sources
I'm working on a class responsible for aggregating data from several sites at once.
I'm aggregating concert listings from several different sources, none of which are both complete
I've got a simple little web app that's aggregating a couple views from some
First the relevent schema: A is a table of list entries with ListID, Date,
I am trying to obtain column sums & row sums by aggregating with previous
I know that I can use .Min() to get minimum value from column, but

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.