0

http://i.stack.imgur.com/4Irb3.pngAndroidリストビューGUIの問題

スクリーンショットのリンクをクリックしてください。

私はxmlレイアウトを編集してこのリストをうまく見せてしまう問題があります。基本的には、情報の各行がリスト行全体を埋めるようにして、各行の間に表示される空白がないようにします。私はrow.xmlとmain.xmlで複数の異なる属性を操作しようとしましたが、これまでに何も機能していませんでした。誰でも助言がありますか?おかげで

row.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:paddingTop="4dip" 
    android:paddingBottom="6dip" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:textColor="@color/white" 
    android:orientation="horizontal"> 

    <TextView android:id="@+id/position" 
     android:textColor="@color/white" 
     android:background="@color/black" 
     android:layout_width="20dip" 
     android:textSize="14dip" 
     android:gravity="center" 
     android:layout_height="fill_parent"/> 

    <TextView android:id="@+id/team_name" 
     android:textColor="#000000" 
     android:background="@color/grey" 
     android:gravity="center" 
     android:layout_width="70dip" 
     android:textSize="14dip" 
     android:layout_height="fill_parent" 
     android:layout_weight="1"/> 

    <TextView android:id="@+id/games_played" 
     android:textColor="#000000" 
     android:background="@color/cyan" 
     android:layout_width="5dip" 
     android:textSize="14dip" 
     android:gravity="center" 
     android:layout_height="fill_parent" 
     android:layout_weight="1"/> 

     <TextView android:id="@+id/points" 
     android:textColor="#000000" 
     android:background="@color/turquoise" 
     android:layout_width="5dip" 
     android:textSize="14dip" 
     android:gravity="center" 
     android:layout_height="fill_parent" 
     android:layout_weight="1"/> 
</LinearLayout> 

main.xml

<?xml version="1.0" encoding="utf-8"?> 
    <TableLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:background="@color/white" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:stretchColumns="1"> 
    <TableRow> 
    <TextView 
     android:text="Team" 
     android:background="@color/red" 
     android:textColor="@color/white" 
     android:gravity="right" 
     android:layout_width="wrap_content" /> 
    <TextView 
     android:text="Games Played" 
     android:background="@color/red" 
     android:textColor="@color/white" 
     android:gravity="center" 
     android:layout_width="wrap_content" 
     android:paddingLeft="22dip" /> 

    <TextView 
     android:text="Points" 
     android:background="@color/red" 
     android:textColor="@color/white" 
     android:gravity="left" 
     android:layout_width="wrap_content" 
     android:paddingRight="18dip"/> 
    </TableRow> 

    <TableRow > 
    <ListView 
     android:background="@color/white" 
     android:id="@android:id/list" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_weight="1"/> 
    </TableRow> 
</TableLayout> 
+2

レイアウトにソースコードがないと、誰でもあなたを支援することが難しくなります。 – CommonsWare

+0

okありがとう、私は最初にソースコードを追加しようとしていましたが、これを知っている人にとって何が間違っているのかはっきりと分かりました。 – blacky

答えて

0

あなたはアンドロイドを設定しました:アンドロイドと同様支えるminHeightの:のLinearLayoutのlayout_heightを?行の高さが修正されます。

+0

私はそれを理解するが、助けてくれてありがとう! – blacky

0

私はそれを理解しましたが、私は直線レイアウトのパディング属性を削除しなければならなかった、私は前にそれを把握していないと信じられない!

関連する問題