如何根据子内容拉伸布局背景图像?

时间:2011-08-16 07:02:04

标签: android android-layout

我想根据孩子的内容拉伸布局背景图片。我使用相对布局并设置气泡图像作为其背景。 在那个相对布局中,我添加了ImageView和TextView作为子项。 文本视图或图像大小的某些内容比泡沫图像大。

我该如何解决?

提前谢谢.....

这是我的气泡图片

enter image description here 与图像..

enter image description here 没有图像

enter image description here 原始的泡沫图像..

1 个答案:

答案 0 :(得分:1)

您应该将该图像转换为9补丁。 Android系统负责根据您在其上定义的可伸缩区域来拉伸9个补丁图像。

相关问题