This question has been asked before: AlertDialog custom title has black border
But was not answered satisfactorily - and is missing some information.
I
dialog.setInverseBackgroundForced(true);
use the above in your code to remove the border of the alert dialog.
Refer this LINK for InverseBackgroundForced.
UPDATED Try this code::::
public class Welcome extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.welcome);
AlertDialog.Builder builder = new AlertDialog.Builder(Welcome.this);
LayoutInflater _inflater = LayoutInflater.from(Welcome.this);
View view = _inflater.inflate(R.layout.welcomedialog,null);
builder.setView(view);
AlertDialog alert = builder.create();
alert.show();
}
}
Note:: Also try by removing android:padding="40px" from welcomedialog.xml.