Question: I have queries that can return large resultsets (> 100K rows). I need to display the number of results to the user and the user is able to page through the results in our application. However, nobody is going to page through 100K items when 25 are displayed on a page. So I want to limit the number of pageable results to 5K while still displaying the total number of results to the user.

Of course, I can fire two seperate queries to the database: one counting all results, one returning the TOP(5000). But the queries can be expensive.

Is there a smart way to combine these two queries into one? The queries below are over simplified:

```
SELECT COUNT(*) FROM TABLE WHERE field = 1;
SELECT TOP(5000) * FROM TABLE Where field = 1;

```

Can anyone help?

Answer: 
Add max rating programmatically , It should fix the issue

```
ratingBar.setMax(5);

```

**Edit:**

replace your rating bar with and check

```
<LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="45dp"
        android:layout_alignParentEnd="true"
        android:layout_below="@+id/eventsubtitle">

    <RatingBar
            android:layout_width="wrap_content"
            android:layout_height="45dp"
            android:id="@+id/ratingbar"
            android:stepSize="1.0"/>

</LinearLayout>

```
ratingBar.setStepSize(1f); worked for me