How to get a Button's background back to default (programmatically)?

前端 未结 6 1243
别跟我提以往
别跟我提以往 2020-12-30 21:06

So I\'m setting a button\'s background doing this:

b.setBackgroundResource(R.drawable.custom_button1);

How do I programmatically set it bac

6条回答
  •  醉话见心
    2020-12-30 21:20

    Drawable for "modern" button in XML is @android:drawable/btn_default_material
    It does not exist in android.R.drawable for some reason.

    EDIT: it's private, so don't use it.

提交回复
热议问题