Is there any way to use not public android resourc

2019-01-17 14:58发布

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="@android:drawable/pressed_application_background_static"

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

2条回答
甜甜的少女心
2楼-- · 2019-01-17 15:38

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.

查看更多
Melony?
3楼-- · 2019-01-17 15:43

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.

查看更多
登录 后发表回答