Android 9 Patch tool: What is the new layout bounds feature?

Brad picture Brad · Jul 10, 2012 · Viewed 10.6k times · Source

I've updated r20 of the Android SDK and started the 9 Patch tool.

There seems to be a new feature - Holding Control and clicking adds layout bounds which are referred to as red pixels.

I've taken a look at the documentation but it seems out of date.

My question is, what are layout bounds used for and what is the best way to use them?

Thanks.

Answer

Sparky picture Sparky · Aug 8, 2012

Edit: Supported in Android 4.3 (API level 18). See more recent answer by wayne.

Original: It's not documented because it's not part of the OS yet, only the tools. The red pixels for setting layout bounds are not used by the Android framework (as of Jellybean 4.1.1), so don't set them at this time. You may speculate about what it means to declare where on your image the layout bounds of the control should be. And watch http://android-developers.blogspot.com/ for announcements.