Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does android set padding for nine-patch image?

As you know, nine-patch image contain the information that how the content aligned. So how does android get the padding of the content. I just can't find the corresponding code in framework. Thanks

like image 802
Frank Cheng Avatar asked Jan 17 '23 14:01

Frank Cheng


1 Answers

http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch

The left and top guidelines tell the framework what can be stretched, the right and bottom guidelines tell it which rows and columns are padding (actually, the area where the inner content can go).

like image 51
Chris Nash Avatar answered Jan 28 '23 05:01

Chris Nash