开发者

Add custom background to AlertDialog Buttons

开发者 https://www.devze.com 2023-03-29 02:38 出处:网络
Is possible to set a drawable res开发者_运维百科ources into the AlertDialog buttons keeping the process easy?

Is possible to set a drawable res开发者_运维百科ources into the AlertDialog buttons keeping the process easy?

Thanks!


I think you are also asking about how to make a custom button as well as a custom alert. Use ImageButton:

http://developer.android.com/reference/android/widget/ImageButton.html

So you will need to both create a custom Alert class as mentioned above and then use ImageButton in the layout so you can replace the button image with whatever you want.


You cannot customize AlertDialog buttons. You can use Custom Dialog instead. Customize AlertDialog Footer

Here are details: http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application

0

精彩评论

暂无评论...
验证码 换一张
取 消