android rating bar xml und numStars
Ich bin ein Anfänger im Entwerfen mit XML: D Dies ist das XML meiner Bewertungsleiste und meiner Freunde:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2" >
<TextView
android:id="@+id/txtTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:textColor="#336699"
android:textSize="18dp"
android:textStyle="bold" />
<RatingBar
android:id="@+id/rtbHighScore"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:numStars="5"
android:max="100"
android:rating="0.0"
android:stepSize="0.0"
style="?android:attr/ratingBarStyleSmall"
android:layout_weight="1" />
<ImageView
android:id="@+id/imgRow"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right"
android:layout_marginBottom="5dp"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:src="@drawable/rightarrow" />
</LinearLayout>
Dasandroid:numStars
ist 5, aber das bekomme ich:
Ich habe gelesen, dass dielayout_width
muss seinwrap_content
So werden die Sterne in der Bewertungsleiste meinen folgenandroid:numStars
und das bekomme ich, wenn ich es änderewrap_content
:
Ich möchte eine 5-Sterne-Bewertungsleiste rechts von meiner Textansicht (oder links von meinem Pfeil nach rechts) erstellen. Danke: D