import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
class UIHelper {
public static void openChangelogPopup(final Context context) {
final AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(true)
.setTitle("Changelog")
.setMessage("line.\n line")
.setNeutralButton("App",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
final Intent intent = new Intent(
Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id="
+ context.getPackageName()));
context.startActivity(intent);
}
}).
setPositiveButton("Close", null);
final AlertDialog di = builder.create();
di.show();
}
}
Related examples in the same category