Normally, developers would insert an image as the border of components in dashboards.
But in the case where significant differences exist between the aspect ratios of components and border assets, the border will be incorrectly displayed.
There’s no doubt that the management won’t be satisfied to see such things on the large screen dashboards, and it seems that there’s nothing can be done with it.
Here it comes! With a complete upgrade for dashboard development:
- Component background filling and border can be configured individually.
- With the image inserted via “Border”, you can further set the “9-Patch Image Setting” to keep the pattern exfactly the same.
But, what is a “9-Patch”? And how does it save our day by keeping intact the border pattern?
You can find the answer here.
First, select a component and insert an image in “Border” on the attribute pane, then click on “9-Patch Image Setting”.
An interactive panel will show.
Here you can drag the lines to set protected areas.
The protected areas on the 4 corners will be kept the same when adjusting the size of components, while the 4 sides stretched.
In cases where the aspect ratio of components is nearly the same as image materials, the filling effect of “Body BG” and “9-Patch” will look the same.
But when the aspect ratios differ greatly, “9-Patch” will have its benefit shown.
For example, the vertical sides of image-filled borders will look unusually thick (as you can see in the red box below) when the component is relatively wide.
“9-Patch” will help you avoid such issues:
And it works better when the component is higher.
As you can see, the pattern on the top right corner distorted and blurred significantly, which impacted the overall feel of the component.
“9-Patch”, on the other hand, presented the patterns perfectly.
Generally speaking, “9-Patch” is a simple but effective solution to boost your productivity.
It is a small step for dashboards, but a giant leap for taking off the burden from developers.
Simple and easy-to-use “9-Patch” can help developers keep the border intact, even with the same image material for component borders with various aspect ratios.
The development of this feature shows that at FanRuan, users always come first despite our continuous leading position on large screens. We will keep advancing on improving the user experience.










