Drawable mIcon= ContextCompat.getDrawable(getActivity(), R.drawable.your_icon);
mIcon.setColorFilter(ContextCompat.getColor(getActivity(), R.color.new_color), PorterDuff.Mode.MULTIPLY);
mImageView.setImageDrawable(mIcon);
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTint(drawable, color);
WindowManager.LayoutParams attrs = this.getWindow().getAttributes();
attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
this.getWindow().setAttributes(attrs);
AlertDialog.Builder builder1 = new AlertDialog.Builder(context);
builder1.setMessage("Write your message here.");
builder1.setCancelable(true);
builder1.setPositiveButton(
"Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
/* DoSomethingWhenUserSaysYes() */
}
});
builder1.setNegativeButton(
"No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
/* DoSomethingWhenUserSaysNo() */
}
});
AlertDialog alert11 = builder1.create();
alert11.show();