title: android studio: adjusting ratingBar star positions
body: <p><strong>UPDATE：when I change it to ConstraintLayout instead of RelativeLayout, it's easier for me to adjust the stars and make it right. But I was still wondering whether there is a way to adjust in ReletiveLayout. Any idea?</strong></p>
  
  <p>I'm using android studio to make an APP with ratingBar. Now my problem is, no matter how I adjust the position of the ratingBar, it doesn't show correctly on either virtual machine or on the real device. For example, when it is complete and in the middle on the XML design page, on the device the rightmost corner of the rightmost star is cut a little bit, like the following picture shows:</p>
  
  <p><a href="https://i.stack.imgur.com/SVd5R.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SVd5R.jpg" alt="rightmost corner is cut a little bit"></a></p>
  
  <p>My code to adjust the ratingBar layout is like this:</p>
  
  <pre><code>&lt;RatingBar
      android:id="@+id/ratingBar1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:numStars="7"
      android:scaleX="0.7"
      android:scaleY="0.7"
      android:stepSize="1"
      app:layout_constraintBottom_toBottomOf="@id/button3"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      android:layout_below="@+id/imageView"
      android:layout_centerHorizontal="true" /&gt;
  </code></pre>
  
  <p>I don't know where the problem is, anyone has idea? </p>
  
  <p>Oh, another information is that this ratingBar is designed on a fragment page of tabbed activity, and this page layout is RelativeLayout, does it matter? </p>
  
  <p>Thanks in advance!</p>