gpt4 book ai didi

Android:从资源创建 NinePatchDrawable

转载 作者:搜寻专家 更新时间:2023-11-01 09:09:00 25 4
gpt4 key购买 nike

如何从我在/drawable 资源中制作的 NinePatch 图像制作 NinePatchDrawable 对象?

最佳答案

调用 getResources().getDrawable(),提供可绘制资源的 ID。引用 getDrawable() 的文档:

Various types of objects will be returned depending on the underlying resource -- for example, a solid color, PNG image, scalable image, etc. The Drawable API hides these implementation details.

关于Android:从资源创建 NinePatchDrawable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9759650/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com