android 9-patch 图形在图像视图中不缩放
问题描述
我有
第一张图片是固定大小的图片,根本不应该缩放.其右侧的图像应水平缩放到最大空间.源指向一个有效的 .9.png 文件.不幸的是,它总是只显示其原始大小.我必须设置什么属性?ImageView 到底是不是正确的对象?
The first image is a fixed size image which shouldn't scale at all. The image right of it should scale horizontally to the maximum space. The source points to a valid .9.png file. Unfortunatly it always only shows up in its original size. What property to I have to set? Is ImageView the right object at all?
谢谢,A.
推荐答案
使用 android:background
代替.如果它只是一个下划线,你可以使用 View
而不是 ImageView
.至于填充屏幕的其余部分,您可能希望使用 TableLayout
代替.
Use android:background
instead. And if it is just an underline, you can use a View
and not an ImageView
. As for filling the remainder of the screen, you may want to use a TableLayout
instead.
另外,请确保您的 9-patch 是正确的.1px 边必须是黑色的.#000
Also, make sure your 9-patch is correct. The 1px sides must be black. #000
这篇关于android 9-patch 图形在图像视图中不缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!