1

So I found this really nice WheelView here that has been mentioned here before. I tried using it but I hit a few problems, and don't know what am I doing wrong. So what I did is link the src folder like it has been done in WheelView-demo app. It didn't work then, but to make it work I had to link a gen folder also and copy layout_bg.xml over to my res->layout folder from the demo app.

After that I created my two arrays of data that will be shown (text) and when I run it I get this. image

For background of both wheels it uses my icon.png files, and I just want it to be white as it is in the original app. Also the selection bar is not transparent so I can not see the selection.

Any ideas what to do? Thanks for the help.

4

1 回答 1

1

好的,我修复了它,但我认为它可能不是正确的解决方案:) 所以有一个名为 layout_bg.xml 的文件,其中定义了具有所选值的栏,颜色明智。这些是内容:

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#FF000000"
        android:centerColor="#FF000000"
        android:endColor="#FF777777"
    android:angle="90" />
</shape>

所以要修复它,我centerColor="#FF000000"centerColor="#00FFFFFF". 你可以写全零,但这样看起来更好。无论如何,仍然让我感到困惑的是,在 android 参考中,它说前两位数字代表 Alpha 通道,FF 是不透明的,00 是透明的,但我不确定这种错误会出现在我下载的这段代码中吗?

于 2011-09-14T13:45:02.073 回答