title: Customizing rating bar in android
body: <p>I have to design a custon list item including rating bar in it </p>
  
  <p>I followed this tutorial([<a href="https://stackoverflow.com/questions/6351053/problem-with-custom-rating-bar-in-android][2]">Problem with custom rating bar in android</a>) for customising and resizing rating bar.Rating bar is now appering small bt i am unable to click on it </p>
  
  <p>My custom listItem Code is :</p>
  
  <pre><code>&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:stretchColumns="*" android:layout_width="fill_parent"
      android:layout_height="fill_parent" android:id="@+id/tbl"&gt;
      &lt;TableRow&gt;
          &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical" android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
              &lt;ImageView xmlns:android="http://schemas.android.com/apk/res/android"
                  android:orientation="vertical" android:layout_width="wrap_content"
                  android:layout_height="wrap_content" android:src="@drawable/icon" /&gt;
              &lt;TextView android:layout_width="wrap_content" android:id="@+id/txt"
                  android:layout_height="wrap_content" android:text="Item Name" /&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical" android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
              &lt;TextView android:layout_width="100dp" android:gravity="center"
                  android:layout_height="wrap_content" android:text="Price" /&gt;
              &lt;TextView android:layout_width="100dp" android:gravity="center"
                  android:layout_height="wrap_content" android:text="Discount" /&gt;
              &lt;TextView android:layout_width="100dp" android:gravity="center"
                  android:layout_height="wrap_content" android:text="In Stock" /&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical" android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
              &lt;!-- &lt;RatingBar android:id="@+id/ratingBar1" android:fitsSystemWindows="false" 
                  android:maxWidth="150dip" android:minHeight="23dip" android:maxHeight="25dip" 
                  android:layout_height="40dp" android:layout_width="150dp" /&gt; --&gt;
              &lt;TextView android:layout_width="wrap_content"
                  android:layout_height="wrap_content" android:text="Shipping days" /&gt;
              &lt;RatingBar android:id="@+id/ratingBar" style="?android:attr/ratingBarStyleSmall"
                  android:layout_gravity="center_vertical|center_horizontal"
                  android:focusable="true" android:layout_width="wrap_content"
                  android:layout_height="wrap_content"&gt;&lt;/RatingBar&gt;
              &lt;Button android:layout_width="60dip" android:layout_height="35dip"
                  android:text="Buy" android:textSize="15dip"/&gt;
          &lt;/LinearLayout&gt;
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>And the screenShot is : <img src="https://i.stack.imgur.com/d68nJ.png" alt="enter image description here"></p>
  
  <p>EDIT :</p>
  
  <p>i developed the customized rating bar but now whatever i set the rating in landscape and when i look at the application in portrait whole rating bars are deselected..what to do to keep rating bar selected ?</p>