如何改变恒星图像的RatingBar的?恒星、图像、RatingBar

2023-09-12 08:56:17 作者:╭那些年'念你╮

使用的Andr​​oid SDK 1.1 R1 ,是有什么办法可以修改的RatingBar Widget类的明星形象与我自己?这是可能的吗?如果是这样,那么如何?

With Android SDK 1.1 r1, is there any way to change the RatingBar widget class's star image with my own? Is this possible at all? If so, then how?

感谢。

推荐答案

简短的回答是,它看起来像它的techincally可能。最简单的方法是基于对的RatingBar源$ C ​​$ C创建自己的RatingBar(更优雅的将是延长还原最初的RatingBar到你自己的)。从那里,你还需要创建使用原始的RatingBar源XML为例(或继承和扩大原有的RatingBar风格)你自己的RatingBar的风格。

The short answer is it looks like it's techincally possible. The easiest way would be to create your own RatingBar based on the RatingBar sourcecode (more elegant would be to extend the orignal RatingBar into your own). From there you would also need to create your own RatingBar style using the original RatingBar source xml as an example (or inheriting and extending the original RatingBar style).

来源可wtih蠢货developer.android.com。

Source is available wtih git at developer.android.com.

我怀疑使自己的等级吧是气馁,因为它违背了一致的外观操作系统和感觉。

I suspect making your own rating bar is discouraged since it goes against the consistent look and feel of the OS.

 
精彩推荐