Button.setBackground(Drawable background) throws NoSuchMethodError

前端 未结 5 1704
故里飘歌
故里飘歌 2021-02-04 08:57

I\'m implementing a simple method to add a Button to a LinearLayout programatically.

When I invoke the setBackground(Drawable background) metho

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 09:40

    You can't use setBackground(). This method may be not available in your Android level.

提交回复
热议问题