How to set property “android:drawableTop” of a button at runtime

前端 未结 8 1056
名媛妹妹
名媛妹妹 2020-12-04 21:01

How to set property \"android:drawableTop\" of a button at runtime

8条回答
  •  清歌不尽
    2020-12-04 21:27

            Button button = (Button) findViewById(R.id.button);
            button.setCompoundDrawables(left, top, right, bottom);
    

提交回复
热议问题