Here is the problem: the text view border is smaller than the cell size in the column that contains “Looooooong Teeeeext”

I use this background drawable
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="1dip" android:color="#1e11d5"/>
</shape>
and This layout for the table
<LinearLayout android:id="@+id/ll_country"
android:layout_height="fill_parent" android:layout_width="fill_parent">
<ScrollView android:id="@+id/ScrollView11"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:fillViewport="true">
<HorizontalScrollView
android:layout_width="fill_parent" android:layout_height="fill_parent"
>
<LinearLayout
android:id="@+id/layout_table"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dip">
<!-- <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:stretchColumns="0,1" android:id="@+id/country_table">
</TableLayout> -->
</LinearLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
this is the code that generates the table
for (int current = 0; current < 100 ; current++) {
row = new TableRow(this);
TextView t;
for(int i =0 ; i < 20 ; i++){
t = new TextView(this);
t.setTextSize(20);
t.setText(" text "+i+" ");
t.setBackgroundDrawable(border);
if((i== 4) && (current == 5)){
t.setText(" looooooong teeeeext ");
}
//t.setWidth(20);
t.setTextColor(Color.BLACK);
row.addView(t,LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);
t.setBackgroundDrawable(border);
}
table.addView(row, new TableLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
}
layout_table.addView(table, new TableLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
Can you also show how you are generating the
borderdrawable? I would suggest usingt.setBackgroundResource(R.drawable.border)instead of
t.setBackgroundDrawable(border)and see if this fixes the problem.