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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:34:15+00:00 2026-05-22T15:34:15+00:00

Noob here again. I’ve followed the example given by Google Dev (and read a

  • 0

Noob here again.

I’ve followed the example given by Google Dev (and read a couple of other tutorials) on how to add a RatingBar to your form/app. However I have been unable to find any examples on the net, of how to take the Rating given and add it as a value to your SQLite database.

Currently you can add your own rating by simply putting a number in an EditText field. However this is not ideal, and the RatingBar seems like a more ideal solution. I suspect it has something to do with OnClick() but Im not entirely sure being a beginner.

Any ideas?

RatingBar:

final RatingBar ratingbar = (RatingBar) findViewById(R.id.ratingbar);
        ratingbar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() { 
        public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
                Toast.makeText(AddBook.this, "New Rating: " + rating, Toast.LENGTH_SHORT).show();

        }
    });

AddRow:

db.addRow
        (

                textFieldOne.getText().toString(),
                textFieldTwo.getText().toString(),
                textFieldThree.getText().toString(),
                textFieldFour.getText().toString(),
                textFieldFive.getText().toString(),
                textFieldSix.getText().toString()





        );

        // request the table be updated
        updateTable();
  • 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-22T15:34:15+00:00Added an answer on May 22, 2026 at 3:34 pm

    Let’s assume that you have an app.

    Let’s further assume that you have a user.

    Let’s keep going out on this limb and assume that you have an an activity in the app, in which the user will fill in data, and that the objective is for this data to wind up in a SQLite database.

    Somewhere, somehow, the user has to indicate to you “Please save this data”. It could be via a button, or a menu choice, or leaving the activity (e.g., onStop()), or whatever. I will call this the “trigger”.

    In your EditText scenario, when the trigger occurs, you would do an insert() or update() or whatever to the SQLiteDatabase with the contents of the EditText, retrieved via getText().

    In your RatingBar scenario, when the trigger occurs, you would do an insert() or update() or whatever to the SQLiteDatabase with the contents of the RatingBar, retrieved via getRating().

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

Sidebar

Related Questions

total noob here with about 2 months of C++ experience (no other background) so
Major bash-noob here. Writing my second program again. For my homework, I need to
Python noob here, Currently I'm working with SQLAlchemy, and I have this: from __init__
Hey! Total CakePHP noob here. Updated at bottom / This is sort of a
I'm a noob in Javascript but here is my problem: I'm cleaning up some
a C++ noob here. I am trying to tweak some code, with the following
A noob question I'm sure. For example, say I have a program that looks
noob here, I'm trying to transfer a file using rsync from windows to linux.
Noob here.... I cloned a git and then created a new branch in it.
noob here and need help from the pros... i am doing a voice record

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.