خرید بک لینک

Vote count: 0

To correct the following by removing the deprecated code, would you use a dialogue fragment? Or is there is different/cleaner way to update this? I am fairly new and after much reading, I am wondering if I am over-complicating this?

protected Dialog onCreateDialog(int id) {
        final boolean bRetry = id == 1;
        retu new AlertDialog.Builder(this)
                .setTitle(R.string.unlicensed_dialog_title)
                .setMessage(bRetry ? R.string.unlicensed_dialog_retry_body : R.string.unlicensed_dialog_body)
                .setPositiveButton(bRetry ? R.string.retry_button : R.string.buy_button, new DialogInterface.OnClickListener() {
                    boolean mRetry = bRetry;
                    public void onClick(DialogInterface dialog, int which) {
                        if ( mRetry ) {
                            doCheck();
                        } else {
                            Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(
                                    "http://market.android.com/details?id=" + getPackageName()));
                            startActivity(marketIntent);
                        }
                    }
                })
                .setNegativeButton(R.string.quit_button, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        finish();
                    }
                }).create();
    }

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 1 مرداد 1395 ساعت: 12:37

صفحه بندی