I\'m creating some 50 button dynamically.
Text is getting set as followed:
btn.Text=result.Rows[i]["Col1"].ToString()+"\\n"+result.Row
In the original question, I wonder if the source text contained some extra space characters? That would explain img1 and img2.
Anyway, my need to left-align the text in a button led me to this page, and here's the solution I ended up with, based on Alix Bloom's answer:
Button myButton = new Button(getActivity());
myButton(Gravity.LEFT);