Thanks in advance…
i have a string array which i want to set in textview in proper alignment..
my textview is created dynamically..
my string is :
private String[] mDialogue =
{
"Copa de Agua 8 Oz\n"+
"Copa de Vino Tinto 6 Oz\n"+
"Copa de Vino Blanco 5 Oz\n"+
"Copa Flauta 5 Oz\n"+
"Copa Tulipan 6 Oz\n"+
"Copa Cocktail 5 Oz\n"+
"Copa Sour 5 Oz\n"+
"Copa Borgo–a 10 Oz\n"+
"Copa Licor 2 Oz\n"+
"Copa Sherry 3 Oz\n"+
"Copa Balon/Cognac 9-25 Oz\n"+
"Copa Champagne 5 Oz\n"+
"Copa Catavinos 3 Oz\n"+
"Vaso High Ball 8 Oz\n"+
"Vaso On the Rocks 6 Oz\n"+
"Vaso Collins/Tubo 10 Oz\n"+
"Vaso Pilsen 10 Oz\n"+
"Jarra de Cerveza 12 Oz",
"1 Mililitro 0,001 L\n"+
"1 Centilitro 0,01 L\n"+
"1 Decilitro 0,1 L\n"+
"2 Cucharadas 10 cc\n"+
"20 Cucharadas 10 cl\n"+
"1 Taza 236,5 cc\n"+
"1 Taza 23,6 cl\n"+
"1 Golpe 1 gota\n"+
"1 Chorro 10 gotas",
}
i set this string statically but for different layouts it doesn`t work properly..
when i run in my emulator its look like :i added screen shot for this..
is there any html format which i set my text in proper alignment..??
or if u have any kind of solution then please help me..
Your best bet is to use a layout with two textviews on each line. As far as I know there’s no good way to do what you want in a single textview.