質問

を使用していTableLayout表示データです。テキストのTextViewsの右欄に設定されますが活動電話onCreate().

現在、ご覧のとおりに以下の画像は自分のアドレステキストできる長さで包み込みます。く設定していま android:layout_width="wrap_content".でもいまだ幅の画面サイズを包むデータです。たいのですが克服から。

alt text

私のxml:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5px">
    <TableRow>
        <TextView android:text="Job#"
            android:paddingRight="5px" />
        <TextView android:id="@+id/DetailJobNo" />
    </TableRow>
    <TableRow>
        <TextView android:text="Address"
            android:paddingRight="5px" />
        <TextView android:id="@+id/DetailAddress"
            android:layout_width="wrap_content"
            android:text="Address Address Address Address Address Address Address Address "/>
    </TableRow>
</TableLayout>
役に立ちましたか?

解決

追加 android:shrinkColumns="1" TableLeayOutに私の問題を解決します。

他のヒント

で設定してみてください setHorizontallyScrollingDetailAdress TextViewがfalse?

@ヴィカス-ス、その良するお問題です。

んだの使用をお勧めしHorizontalScrollView確保するためのればこの数字は見えませんし、水平スクロールバーを管理します。XMLテキスト:

<HorizontalScrollView android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp" android:layout_marginBottom="10dp" >

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"   
android:layout_width="fill_parent"   
android:layout_height="fill_parent"   
android:padding="5px">   
  ......
  ......
  ADD YOUR ROWS 
 </TableLayout>       
</HorizontalScrollView>

そのについての予想外でした。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top