Android - DialogPreferenec with one button only
By default,开发者_高级运维 DialogPreference has two buttons - OK and Cancel. I want to leave only the OK button and remove the cancel button - how can i do that?
You can easily remove the cancel button or okey button just set the setNegativeButtonText(null); for cancel and setPositiveButtonText(null); for okey.
Take a look at this example: http://developer.android.com/guide/appendix/faq/commontasks.html#alerts
You should only need the setPositiveButton attibute.
加载中,请稍侯......
精彩评论