首页 Android android中setNegativeButton和setNeutralButton的区别是什么?

android中setNegativeButton和setNeutralButton的区别是什么?

只是在android的alertDialog中封装好的一些Button 这些Button和普通的Button没有任何区别…

只是在android的alertDialog中封装好的一些Button 这些Button和普通的Button没有任何区别,可以写任意的方法,只是命名上的不同,一般有三个Button:PositiveButton,NegativeButton,NeutralButton。从名字可以看的出来,代表确定,否定,和中立,其实三个Button可以写你任意的方法,只是位置上的不同而已,确定Button一般靠左,这是阅读习惯。本质上都是三个Button并没有很大的区别,也许可能NegativeButton里面写了dismiss方法,这些我并没有去深究。

免责声明:文章内容不代表本站立场,本站不对其内容的真实性、完整性、准确性给予任何担保、暗示和承诺,仅供读者参考,文章版权归原作者所有。如本文内容影响到您的合法权益(内容、图片等),请及时联系本站,我们会及时删除处理。

为您推荐

android studio查看android手机日志

android studio查看android手机日志

本文在尝试了,使用adb,eclipse查看log未果之后,使用android studio来查看unity打包的apk...
Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check t

Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check t

在android高版本开发环境(sdk 4.4)导入低版本(sdk 3.0)的工程时编译报错,报错信息如:Convers...
用Bundle和直接用Intent.putExtra(“xx”,yy)传递有什么不同

用Bundle和直接用Intent.putExtra(“xx”,yy)传递有什么不同

QQ群里一个提出来了 。。长知识了。。 Intent intent = new Intent(); intent.put...
Universal-Image-Loader解析——DisplayImageOptions的详细配置

Universal-Image-Loader解析——DisplayImageOptions的详细配置

在使用这个框架的时候,我们必须要配置一个DisplayImageOptions对象来作为ImageLoader.getI...
安卓测试环境的配置

安卓测试环境的配置

AndroidManifest.xml 配置 <uses-permission android:name="and...
返回顶部