I'm trying to dynamically change the image of the button image. There's text above the image.
At this time, if you use ImageButton
, you can't add text, and if you use Button
, android:drawableBottom
in the xml property, but this doesn't overlap the text with the image.
All I want to do is overlap. I kept looking for ways to override draw()
on Button or ImageButton, but it was too difficult on my level. Isn't there an easy way for me to do it?
There is a way to sing setBackgroundDrawable()
in the Button instance. If you set the background drawable, the background image will be applied under the characters.
Or you can add android:background
to the button property in xml.
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
914 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.