その中に3つのtextViewを含むリストビューを設計しようとしています。1 つのテキストビューは作成者用、2 つ目は日付用、最後のテキストビューはコメント用です。しかし、レイアウトに問題があり、XML の怪物ではありません。だから私はいくつかのアドバイスが必要です。これは私のリストが atm のように見えるものです: http://tinypic.com/view.php?pic=357khhj&s=6
ご覧のとおり、誰かが 2 つ以上の単語 (jesper のコメントなど) を入力すると、すべてがひどいものに見えます。写真のように行がすべて狂わずにこれを修正する方法はありますか? また、コメントに2行のテキストしか表示できないようにしたいのですが、実際に入力したとしても、例として10行としましょう。ありがとう!
xml コードは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffffff" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:weightSum="1.0" >
<TableRow>
<TextView
android:id="@+id/feedback_list_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_weight="0.8"
android:gravity="left"
android:shadowColor="#bdbebd"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="0.5"
android:text="Unknown"
android:textColor="#000000"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:id="@+id/feedback_list_item_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="0.2"
android:gravity="right"
android:shadowColor="#bdbebd"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="1.0"
android:text="00:00"
android:textColor="#3c6dae"
android:textSize="16dp" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/feedback_list_item_comment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:shadowColor="#cccccc"
android:shadowDx="1.0"
android:shadowDy="1.0"
android:shadowRadius="0.5"
android:text="No comment"
android:textColor="#222222"
android:textSize="16dp" />
>
</TableRow>
</TableLayout>
</LinearLayout>