1
Does anyone know how I customize these edittext that will 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));
}
}
}