How do I customize these EditText that will be generated (backcground, TextColor, fontSize, etc.)

1

Someone knows how I customize these EditText to be generated (backcground, TextColor, fontSize, etc.)

public class Main2Activity extends AppCompatActivity {

    private LinearLayout layout;
    private EditText[] vetorEdits;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);


        layout = (LinearLayout) findViewById(R.id.layout);

        int count = getIntent().getIntExtra("qtd", 0);
        vetorEdits = new EditText[count];


        for(int i=0; i<count; i++){

            vetorEdits[i] = new EditText(Main2Activity.this);
            vetorEdits[i].setHint("Periodo " + (i+1));


            layout.addView(vetorEdits[i], new ViewGroup.LayoutParams(
                    LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));


        }

    }

}
    
asked by anonymous 11.09.2017 / 01:48

1 answer

0
vetorEdits[i].setTextColor(Color.PINK);    
vetorEdits[i].setBackgroundColor(Color.PINK);    
vetorEdits[i].setTextSize(24);
    
11.09.2017 / 05:50