How to show the text on a ImageButton?

后端 未结 11 1456
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 08:42

I have an ImageButton and I want to show a text and an image on it. But when I try on emulator:



        
11条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 09:17

    Actually, android:text is not an argument accepted by ImageButton but, If you're trying to get a button with a specified background (not android default) use the android:background xml attribute, or declare it from the class with .setBackground();

提交回复
热议问题