2

Androidの評価バーの開始画像を変更するにはどうすればよいですか?

ユーザーに見せるために必要です。

または、不可能な場合-レイアウトの特定の位置にある開始のX画像をどのように表示できますか?

ヨアヴ

4

1 に答える 1

7

私はあなたの質問を理解したいと思います-あなたはRatingBarを使用してカスタム画像を設定したいですか?

Androidはすでに星を表示していますが、カスタム画像が必要な場合は、カスタムスタイルRatingBarを定義してください

<style name="customRatingBar" parent="@android:style/Widget.RatingBar">
    <item name="android:progressDrawable">@drawable/custom_image</item>
    <item name="android:indeterminateDrawable">@drawable/custom_image</item>
</style>

そしてそれを使用します

<RatingBar style="@style/customRatingBar" ... /> 
于 2011-09-16T18:31:10.360 に答える