Мне нужно визуализировать набор карт, и каждый из них должен иметь рейтинговую панель с пятью звездами. я использовал код ниже: Используйте панель оценки в Cardview
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="@color/primary">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/card_title"
android:text="@string/titolo"
android:lines="1"
android:textColor="@color/icons"
android:textSize="15sp"
/>
<android.widget.RatingBar
android:id="@+id/myRatingBar"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:isIndicator="true"
android:background="@android:color/holo_red_dark"/>
</LinearLayout>
, но я не могу увидеть бар raing в моем cardview. В чем проблема? Пожалуйста, помогите мне, спасибо
Из-за 'android: layout_height =" match_parent "' в TextView. измените его на 'android: layout_height =" wrap_content "' –