相关疑难解决方法(0)

在onClick中获取上下文(DialogInterface v,int buttonId)?

获取内容的上下文onClick(View view),按钮的回调onClickListener()很容易:

view.getContext()
Run Code Online (Sandbox Code Playgroud)

但我无法弄清楚如何获得上下文中onClick(DialogInterface v, int buttonId),对于回调对话框onClickListener

public class MainActivity extends Activity implements android.content.DialogInterface.OnClickListener
Run Code Online (Sandbox Code Playgroud)

这可能吗?

android dialog onclick android-context

60
推荐指数
3
解决办法
8万
查看次数

标签 统计

android ×1

android-context ×1

dialog ×1

onclick ×1