Я пытаюсь создать ListView, который имеет линию на игрока. Каждая строка должна быть очень маленькой, но вместо этого она заполняет весь экран двумя массивными линиями.ListView заполняет половину экрана
Это мой XML:
<?xml version="1.0" encoding="utf-8"?>
<SlidingDrawer android:id="@+id/slidingDrawer" android:handle="@+id/drawerHandle"
xmlns:android="http://schemas.android.com/apk/res/android"
android:content="@+id/contentLayout" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentBottom="true"
android:visibility="visible"
android:background="#000000">
<ImageView android:id="@+id/drawerHandle"
android:src="@drawable/blue_arrow_up_flat"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ImageView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contentLayout" android:gravity="center"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<ListView
android:id="@+id/lvwScores"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:divider="#FFFFFF" android:dividerHeight="1dip"
android:layout_weight="1" android:layout_marginBottom="60dip"
android:footerDividersEnabled="true" android:headerDividersEnabled ="true"
android:background="#000000"/>
</LinearLayout>
</SlidingDrawer>
Row:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/tvwPlayerName" android:gravity="left"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_alignParentLeft="true"/>
<TextView android:id="@+id/tvwPlayerScore" android:gravity="right"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="12sp"
android:layout_alignParentRight="true"/>
</RelativeLayout>
Вы уверены, что вы хотите использовать ListView для этого? у вас есть список предметов, которые вы хотите прокрутить? – Joe
Это список игроков в игре со своими баллами. Там может быть до девяти, поэтому есть большая вероятность, что они не будут помещаться на одном экране. – theblitz