Reputation: 161
I create some buttons in my java code. The probleme is the text that i create for this button is always center, do you know how to change is position. I've search and no found because i create it in the java code, not in the xml
Button moncasier = new Button (this);
moncasier.setText("casier numéro :"+i);
moncasier.setTextSize(30);
moncasier.setBackground(getResources().getDrawable(R.drawable.img_casier));
layoutDesCasiers = (LinearLayout)findViewById(R.id.affichecasier);
layoutDesCasiers.addView(moncasier);
Thanks for the time you spend to me and sorry for my bad english
Upvotes: 0
Views: 3768