Monday, 21 August 2017

Create Custom Smaller Rating bar

Step 1:


<LinearLayout    
       android:layout_width="match_parent"   
       android:layout_height="match_parent"    
       android:orientation="horizontal"    
       android:weightSum="1">
    <TextView        
       android:layout_width="wrap_content"        
       android:layout_height="wrap_content"        
       android:text="Plaint verified rating:  "        
       android:textColor="@android:color/white"        
       android:textSize="12dp"        />
    <RatingBar       
       android:id="@+id/go_rating"       
       android:layout_width="wrap_content"       
       android:layout_height="wrap_content"      
       android:rating="5"        
       style="?attr/ratingBarStyleSmall"        
       android:theme="@style/RatingBar"/>
</LinearLayout>

Step 2:

<style name="RatingBar" parent="Theme.AppCompat">
    <item name="colorControlNormal">@android:color/white</item>
    <item name="colorControlActivated">@android:color/white</item>
</style>


No comments:

Post a Comment

HOW TO CREATE CIRCLE IMAGE VIEW

Step 1: implementation 'de.hdodenhof:circleimageview:3.0.0' Step 2: <de.hdodenhof.circleimageview.CircleImageView xmlns:ap...