这个问题在这里已经有了答案:
How to reduce the space around rating bar in android
(3 个回答)
3年前关闭。
我的应用程序上有评分栏,它看起来像这样:
我尝试将填充设置为 0dp,但 View 没有任何变化。
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:layout_marginStart="16dp"
android:isIndicator="false"
style="@style/Widget.AppCompat.RatingBar"/>
预期结果:我期待评级栏没有右填充和底部填充。
最佳答案
你可以简单地调整这个
style="@android:style/Widget.DeviceDefault.RatingBar.Small"
代替
style="@style/Widget.AppCompat.RatingBar
关于java - 如何从 Android 的评级栏中删除填充?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54071037/