How can I access all drawables in android?

前端 未结 4 1149
攒了一身酷
攒了一身酷 2020-12-03 01:58

Only some drawables are accessible via the syntax. For example expander_ic_maximized is not accessible, yet its cle

4条回答
  •  孤城傲影
    2020-12-03 02:28

    I realize it's a bit more work, but as a workaround you could just set the image resource programatically.

    findViewById(R.id.ImageButton1).setImageResource(android.R.drawable.expander_ic_maximized)

提交回复
热议问题