问题与Android的定制等级酒吧等级、酒吧、问题、Android

2023-09-06 18:59:39 作者:你给不起我未来

我实现了定制化的评价栏中按如下说明

I implemented customized rating bar as explained here

如何在Android中创建自定义等级栏

但是当我试图让了minHeight评级巴≤的; 23,我总是得到这样的结果。

but when I try to make the minHeight of the rating bar<23 I always get this result

而我想要做这种规模的评级酒吧

while I wanna make a rating bar with this size

我必须根据评级酒吧最大和最小高度或如何调整我绘使用的图像?

do I have to resize the images I use in drawable according to the rating bar max and min heights or what?

推荐答案

这个问题可能会涉及到筛网分辨率。尝试添加这对您的清单文件:

The problem maybe be related to the sreen resolution. Try to add this on your manifest file:

 <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.main" android:versionCode="1" android:versionName="1.0">
    <supports-screens android:smallScreens="true"
        android:normalScreens="true" android:largeScreens="true"
        android:anyDensity="true" />
...

这里

更多信息: http://www.jdamcd.com/?p=303

和你也可以尝试设置风格=机器人:ATTR / ratingBarStyleSmall