开发者

Is there any way to use not public android resources in my application?

I need to use the following resources in my widget:

  • pressed_application_background_static
  • focused_application_background_static

I hope that usage of these resources will allow me to have orange background on standard android and green on HTC.

But they are not public, so usage of

android:drawable="@and开发者_如何学JAVAroid:drawable/pressed_application_background_static"

is not allowed. Is still there any way to use them?


You can reference them like this

android:drawable="@*android:drawable/pressed_application_background_static"

but it is not recommended, because private resources are likely to be renamed or removed in the future.


browse the sdk for the drawable and copy it locally to you res/drawable folder. it will probably be an XML file but if you search for "pressed_application_background_static" you should find it without trouble.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜