<?xml version="1.0" enCoding="utf-8"?><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:tools="http://schemas.androID.com/tools" xmlns:app="http://schemas.androID.com/apk/res-auto" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:padding="@dimen/spacing_standard" androID:orIEntation="vertical" androID:background="@color/sfly_orange" androID:fillVIEwport="true"><com.shutterfly.androID.commons.common.ui.TypefacedTextVIEw androID:ID="@+ID/thank_you_label_vIEw" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:text="@string/order_confirmation_thank_you" androID:textcolor="@androID:color/white" androID:textSize="@dimen/rate_app_text_size_largest" androID:gravity="center" app:typeface="medium" androID:layout_margintop="@dimen/spacing_standard"/><ImageVIEw androID:layout_wIDth="@dimen/rate_app_image_wIDth" androID:src="@drawable/rate_icon" androID:layout_gravity="center_horizontal" androID:layout_margintop="@dimen/rate_app_spacing_standard" androID:layout_height="@dimen/rate_app_image_height"/><linearLayout androID:layout_wIDth="match_parent" androID:orIEntation="vertical" androID:gravity="center" androID:layout_height="wrap_content" androID:layout_margintop="@dimen/rate_app_spacing_standard"> <com.shutterfly.androID.commons.common.ui.TypefacedTextVIEw androID:ID="@+ID/order_number_label_vIEw" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:gravity="center" app:typeface="medium" androID:text="@string/order_confirmation_order_number_label" androID:textcolor="@androID:color/white" androID:textSize="@dimen/rate_app_text_size_normal"/> <com.shutterfly.androID.commons.common.ui.TypefacedTextVIEw androID:ID="@+ID/order_number_vIEw" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:gravity="center" app:typeface="medium" androID:layout_margintop="@dimen/spacing_standard" androID:textcolor="@androID:color/white" androID:textSize="@dimen/rate_app_text_size_larger"/> <com.shutterfly.androID.commons.common.ui.TypefacedTextVIEw androID:ID="@+ID/order_confirmation_details_label_vIEw" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:text="@string/order_confirmation_details_label" androID:layout_margintop="@dimen/spacing_standard_large" androID:textAlignment="center" androID:linespacingExtra="@dimen/rate_app_text_line_spacing" androID:gravity="center" app:typeface="oblique" androID:textcolor="@androID:color/white" androID:textSize="@dimen/rate_app_text_size_normal" tools:ignore="UnusedAttribute"/> <ratingbar androID:ID="@+ID/rate_app_rating_bar" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_margintop="@dimen/rate_app_spacing_standard" androID:numStars="@integer/rating_bar_number_of_stars" androID:stepSize="@integer/rating_bar_step" androID:minHeight="@dimen/button_height" androID:maxHeight="@dimen/button_height" androID:layout_gravity="center" androID:progressDrawable="@drawable/rating_bar_star_style"/></linearLayout><linearLayout androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:gravity="center" androID:orIEntation="vertical" androID:layout_margintop="@dimen/rate_app_spacing_standard"> <com.shutterfly.androID.commons.common.ui.TypefacedTextVIEw androID:ID="@+ID/rate_app_button" androID:layout_wIDth="@dimen/button_wIDth" androID:layout_height="@dimen/button_height" androID:gravity="center" androID:background="@drawable/button_white_background" androID:paddingleft="@dimen/spacing_standard" androID:paddingRight="@dimen/spacing_standard" androID:text="@string/rate_shutterfly" androID:textAllCaps="true" androID:textcolor="@color/sfly_orange" androID:textSize="@dimen/rate_app_text_size_normal_larger" app:typeface="medium"/> <com.shutterfly.androID.commons.common.ui.Typefacedbutton androID:ID="@+ID/return_to_store_button" androID:layout_wIDth="@dimen/button_wIDth" androID:layout_height="@dimen/button_height" androID:paddingleft="@dimen/spacing_standard" androID:layout_margintop="@dimen/spacing_standard" androID:layout_gravity="bottom|center_horizontal" androID:paddingRight="@dimen/spacing_standard" androID:text="@string/order_confirmation_return_to_store" androID:textAllCaps="true" androID:textcolor="@color/white" androID:textSize="@dimen/rate_app_text_size_normal" app:btnTypeface="medium" androID:layout_marginBottom="@dimen/spacing_standard" androID:background="@drawable/button_orange_background"/></linearLayout></linearLayout>
解决方法 也许默认的numStars值已更改.
当我在xml文件中设置它时,它工作正常.
<ratingbar ... numStars="5" />
如果wrap_content没有足够的空间来显示5颗星,那么它也可能是布局问题.也许你有API 23的资格赛?如果没有,它适用于< 23,请不要介意.
总结以上是内存溢出为你收集整理的android – 自定义RatingBar在api 23上显示不同数量的星星全部内容,希望文章能够帮你解决android – 自定义RatingBar在api 23上显示不同数量的星星所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)