Android – when to use 9-patch

Are there any Android Developer documentation describing when a paintable resource can be a 9 patch? In other words, is there a document saying "the following items use 9 patch data, if available"?

From exploration and experience, I already know that 9 patch graphics should be used

>Application launcher icons > Application widgets, wallpapers and folders' add to home screen selection list icons used > Desktop Wallpapers, otherwise use bitmaps, such as on canvas > button graphics > View backgrounds

When drawable was used for menu icons and label icons, I was surprised to find that 9 patch data was ignored

resolvent:

When your image requires fluid width and / or height, it is best to use 9 color blocks

Example: in my application, I have two custom buttons across the bottom of the view. Since the screen size may be different, I use 9 patches to allow the buttons to stretch correctly

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
分享
二维码
< <上一篇
下一篇>>