I've made the following code to insert TextViews into a LinearLayout already defined.
public void inserirLacunas(){
LinearLayout ll = (LinearLayout) findViewById(R.id.layoutLetras);
for(int i = 0; i < palavraCerta.length(); i++){
TextView lacuna = new TextView(this);
lacuna.setText("_");
lacuna.setTextSize(40);
ll.addView(lacuna);
}
}
My question is: how can I put a marginRight
in the TextView loophole, so that at the time the code runs, do not get TextViews too much next to each other?
wordCerta is another variable created previously in the code, which does not matter in this doubt