Here's my code, rest wirtten below.
public void Anzeigen_Reaper(View view) {
AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this);
helpBuilder.setTitle("Test Title");
helpBuilder.setMessage("Test Message");
helpBuilder.setPositiveButton("Ok, got it!",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
AlertDialog helpDialog = helpBuilder.create();
helpDialog.show();
}
I don't know how I can center my title (helpBuilder.setTitle("Test Title");
) without adding several "\t". Of course i could add 20 time "\t" to get it at the center but probably there is a special instruction/abbreviation for this.
I couldn't add help.Builder.setGravity("GRAVITY.CENTER);
because setGravity
was marked red.
Does anyone knows how to solve this? If its possible without styles, but if it's necessary, tell me how I do this, because I dont know how "styles.xml" works.
Thanks in advance!