Example of custom ProgressBar for Android programming

This article describes the example of Android programming custom ProgressBar. Share with you for your reference, as follows:

This is the progressbar control. Just use Android: indeterminatedrawable to reference the above file

There is nothing to introduce about the attributes in gradient. Here is mainly shape

The following attributes are only used when Android: shape = "ring":

Android: innerradix dimension value, which specifies the radius inside the ring (the radius of the circular hole in the middle) with dimension value or dimension resource.

Android: innerradiusratio floating-point value, which represents the radius of the inner ring by the ratio of the ring width. For example, if Android: innerradiusratio = "5", the inner radius is equal to the width of the ring divided by 5. This value will be overwritten by the value of Android: innerradius. The default is 9.

Android: thickness dimension value, which uses a dimension value or dimension resource to define the thickness of the ring.

Android: thicknessratio floating point value. It uses the ratio of ring width to ring thickness. For example, if Android: thicknessratio = "2", the thickness is equal to the width of the ring divided by 2. This value will be overwritten by Android: innerradius. The default value is 3. That is, the larger this value is set, the thinner the ring will be.

Android: uselevel Boolean value. If this shape is to be used for levellistdrawable object, it is set to true. Usually you should set it to false or make the shape invisible.

More readers interested in Android related content can view the topics on this site: summary of Android basic component usage, introduction and advanced tutorial of Android development, summary of Android layout skills, summary of Android view skills, summary of activity operation skills of Android programming, summary of Android resource operation skills, and Android control usage summary

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>