私はAndroidを初めて使用し、すべての行に2つのテキストビューを含むテーブルレイアウトを設計しています.問題は、テキストが長い場合、テキストビューのテキストが切り捨てられることです.ラップコンテンツを使用し、重みも適用しましたが、役に立ちません.Theレイアウトのコードは以下です
<TableLayout
android:id="@+id/tableLayout"
style="@style/fill_parent_wrap_content" >
<TableRow style="@style/both_wrap_content" >
<TextView
style="@style/InfoTextView1"
android:text="@string/customerName"
android:textStyle="bold" />
<TextView
android:id="@+id/txtDetailCustomerName"
style="@style/InfoTextView1" />
</TableRow>
<TableRow style="@style/both_wrap_content" >
<TextView
style="@style/InfoTextView1"
android:text="@string/caNumberDetail"
android:textStyle="bold" />
<TextView
android:id="@+id/txtDetailCaNo"
style="@style/InfoTextView1" />
</TableRow>
<TableRow style="@style/both_wrap_content" >
<TextView
style="@style/InfoTextView1"
android:text="@string/customerAddress"
android:textStyle="bold" />
<TextView
android:id="@+id/txtDetailAddress"
style="@style/InfoTextView1"
/>
</TableRow>
</TableLayout>
</Scrollview>
This is a style that i apply to textviews
<style name="InfoTextView1">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">5dp</item>
<item name="android:paddingTop">15dp</item>
<item name="android:textColor">@color/Black</item>
<item name="android:textSize">@dimen/text_size_small</item>
</style>