How to increase text size of AlertDialog?

2

Can you increase the size of the letters of a message that I display within a AlertDialog ?

Code:

AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

builder.setMessage("Gasolina");
builder.setTitle("Sua melhor opção é:");
builder.setPositiveButton("OK",null);
builder.show();
    
asked by anonymous 19.08.2016 / 15:06

1 answer

3

Use this code below to change the text size:

AlertDialog dialog = new AlertDialog.Builder(this)
        .setTitle("Gasolina")
        .setMessage("Sua melhor opção é: ")
        .setPositiveButton("OK", null)
        .show();

        TextView textView = (TextView) dialog.findViewById(android.R.id.message);
        textView.setTextSize(40);
    
19.08.2016 / 15:10