hi .
im developing an android application ,
but i have a little problem .
i want to make 10 buttons dynamically.
if i set Button text directly it works and it creates 10 buttons very well.
LinearLayout ll=(LinearLayout)findViewById(R.id.lil);
for(int i=0 ;i<=9;i++)
{
Button B=new Button(this);
B.setTextSize(TypedValue.COMPLEX_UNIT_DIP,10);
B.setText("1");
ll.addView(B);
}
but as you see if i want to set text like below it makes only
one button
without any text !
String BtnText="";
String temp="";
String []DD=new String [3];
LinearLayout ll=(LinearLayout)findViewById(R.id.lil);
for(int i=0 ;i<=9;i++)
{
temp=SplitData[i];
DD=temp.split("/");
BtnText=DD[0].toString();
Button B=new Button(this);
B.setTextSize(TypedValue.COMPLEX_UNIT_DIP,10);
B.setText(BtnText);
ll.addView(B);
}
surprisely i debugged my application line by line and
couldnt see any problem .everything works well, i dont have any Exception but as i said
it makes only one Button without any text !
so i need help , do you have any suggestion ?