【发布时间】:2012-04-24 16:36:27
【问题描述】:
我想获得可绘制的边界,但随后我使用 getBounds 或 copyBounds 方法。它们都返回 Rect(0, 0 - 0, 0)。 像这样的代码
Drawable marker = getResources().getDrawable(
R.drawable.tbar_single_pressed);
Rect copyRect = marker.copyBounds();
Rect getRect= marker.getBounds();
那么结果 copyRect 是 Rect(0, 0 - 0, 0) getRect 也是 Rect(0, 0 - 0, 0)
为什么?标记不为空,我有 res tbar_single_pressed....
谢谢
【问题讨论】: