RatingBar の表示サイズ

RatingBar ProgressDialog に使おうと思った時、表示サイズはあまり選択肢がない。
 (RatingBar を ProgressDialog に使うのは変なのかもしれないが、その点はあまり言及せず。。。)
標準以外は、レイアウトの style属性で以下のように書く。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#cccccc" >

    <TextView
        android:id="@+id/progressTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginBottom="10dp"
        android:layout_gravity="center_horizontal"
        android:textColor="#000000"
        android:text="Loading ..." />

    <RatingBar
        android:id="@+id/ratingBar1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_gravity="center_horizontal"
        style="?android:attr/ratingBarStyleSmall" />

</LinearLayout>

この ?android:attr/ratingBarStyleSmall を指定した時の表示は、以下のとおり。

f:id:posturan:20160314233230p:plain



style="?android:attr/ratingBarStyleIndicator"
を指定すると、、、

f:id:posturan:20160314233222p:plain



style を指定しない標準は、、、

f:id:posturan:20160314233213p:plain



切り抜いてここに張り付けた画像なので判りにくいが、
ratingBarStyleSmall は、小さすぎるように思え、
標準は、実際かなり大きく、 
ratingBarStyleIndicator が丁度良かった。