问题
I manually created a 9-patch .png as shown below / indicated here:
- Stretch areas
- Top: Dot all the way to the left, dot all the way to the right
- Left: Dot all the way at the top, dot all the way at the bottom
- Content area
- Bottom: Line entire length of image
- Right: Line the entire height of image
I expect it to render the image in the center both vertically and horizontally, however it's rendering too low vertically (and I'm not sure horizontally).
I may be misunderstanding the 9-patch rendering algorithm, like how it decides how much to stretch each area on a given axis. Or how Cordova tags the 9-patch for my Meteor application. Anything insights are welcome!
My 9-patch
Rendering on Nexus 5
来源:https://stackoverflow.com/questions/38163429/how-can-i-get-9-patch-to-center-my-image-on-a-cordova-launch-screen