vendredi 18 septembre 2020

AAPT: error: attribute android:style not found for RatingBar

I am trying to create a small size RatingBar and I tried to run below code on my device but I am getting this issue "AAPT: error: attribute android:style not found." after clicking on Run App button
Please help me to find the solution..

activity_main.xml

<RatingBar
  android:layout_width="wrap_content"
  android:rating="4"
  android:id="@+id/ratingBar"
  android:paddingTop="10px"
  android:paddingLeft="20px"
  android:style="@style/RatingBar"
  android:stepSize="1"
  android:isIndicator="true"
  android:layout_height="wrap_content"/>

styles.xml
<style name="RatingBar" parent="Widget.AppCompat.RatingBar.Small">
  <item name="colorControlNormal">@color/ratingColor</item>
</style>

Aucun commentaire:

Enregistrer un commentaire