Search in sources :

Example 1 with SpotDialogListener

use of net.youmi.android.spot.SpotDialogListener in project ABPlayer by winkstu.

the class MainActivity method show_existDialog.

private void show_existDialog() {
    // 弹出退出对话框
    Builder dialog = new AlertDialog.Builder(MainActivity.this).setMessage("您确定要退出吗?").setPositiveButton("确定", new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface arg0, int arg1) {
            // 退出程序
            finish();
        }
    }).setNegativeButton("支持我", new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface arg0, int arg1) {
            SpotManager.getInstance(MainActivity.this).showSpotAds(MainActivity.this, new SpotDialogListener() {

                @Override
                public void onShowSuccess() {
                    Log.i("YoumiAdDemo", "展示成功");
                }

                @Override
                public void onShowFailed() {
                    Log.i("YoumiAdDemo", "展示失败");
                }

                @Override
                public void onSpotClosed() {
                    Log.i("YoumiAdDemo", "展示关闭");
                }
            });
        }
    });
    dialog.show();
}
Also used : AlertDialog(android.app.AlertDialog) DialogInterface(android.content.DialogInterface) Builder(android.app.AlertDialog.Builder) Builder(android.app.AlertDialog.Builder) SpotDialogListener(net.youmi.android.spot.SpotDialogListener)

Aggregations

AlertDialog (android.app.AlertDialog)1 Builder (android.app.AlertDialog.Builder)1 DialogInterface (android.content.DialogInterface)1 SpotDialogListener (net.youmi.android.spot.SpotDialogListener)1