final AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).create();LayoutInflater inflater = getLayoutInflater();View convertView = (View) inflater.inflate(R.layout.dialog, null);dialog.setView(convertView);dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);LinearLayout lin = (LinearLayout)
convertView.findViewById(R.id.linear1);android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();
gd.setColor(Color.parseColor("#ffffff"));gd.setCornerRadius((int)(20));lin.setBackground(gd);dialog.setCancelable(false);dialog.show();
0 Comments