Android how to increase height and width of star in ratingbar
<p>I am implementing <code>ratingbar</code> and I want to set <code>ratingbar</code> like below attached image but the problem is that when I use <code>match_parent</code> of <code>ratingbar</code> width then more than five star show in <code>ratingbar</code>. Can anyone help me how to implement my rating bar as attached image or suggest me how to implement it.
Here is my activity_main</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="gymtrainer.com.ratinbarexample.MainActivity"&gt;

    &lt;Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="20dp"
        android:text="Rate 5 star for RatingBar"
        /&gt;


    &lt;RatingBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="20dp"
        style="@style/foodRatingBar"
        android:id="@+id/ratingbar_default"
        android:maxWidth="250dp"
        android:numStars="5"
        android:stepSize="0.1"
        /&gt;


    &lt;TextView
        android:id="@+id/textView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="show state up checkbox"
        android:textColor="#CC00CC"
        android:textSize="20dp"
        /&gt;


&lt;/LinearLayout&gt;
</code></pre>

<p>Here is my Main Activity.</p>

<pre><code>    public class MainActivity extends Activity {

    RatingBar ratingbar1;
    Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        addListenerOnButtonClick();

    }

    public void addListenerOnButtonClick(){

        final TextView text = (TextView) findViewById(R.id.textView);

        final RatingBar ratingBar_default = (RatingBar)findViewById(R.id.ratingbar_default);

        final Button button = (Button)findViewById(R.id.button1);
        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                ratingBar_default.setRating(5);
                text.setText("Rating: "+String.valueOf(ratingBar_default.getRating()));
            }
        });

        ratingBar_default.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener(){
            @Override
            public void onRatingChanged(RatingBar ratingBar, float rating,
                                        boolean fromUser) {
                // TODO Auto-generated method stub
                text.setText("Rating: "+String.valueOf(rating));
            }});
    }
}
</code></pre>

<p>Here is my style</p>

<pre><code> &lt;style name="foodRatingBar" parent="@android:style/Widget.RatingBar"&gt;
    &lt;item name="android:progressDrawable"&gt;@drawable/star_rating_bar_full&lt;/item&gt;
    &lt;item name="android:minHeight"&gt;100dip&lt;/item&gt;
    &lt;item name="android:maxHeight"&gt;100dip&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/wTzCX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wTzCX.png" alt="enter image description here"></a></p>