0
У меня есть ListView, и я хотел бы иметь следующую структуру:Android: выравнивать пункты в Listview
У меня есть несколько проблем: текст не совпадает с изображением, правое изображение исчезает в некоторых предметах, 2 строки не показывают ... Мне нужна помощь, пожалуйста. Это мой код:
<?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:layout_alignParentTop="true"
android:background="@drawable/listview_naranja"
android:orientation="horizontal"
android:padding="5dip" >
<LinearLayout
android:id="@+id/thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="5dip"
android:padding="3dip"
android:paddingTop="5dip" >
<ImageView
android:id="@+id/imagenListview"
android:layout_width="100dip"
android:layout_height="100dip" />
</LinearLayout>
<TextView
android:id="@+id/textoListviewNombre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/thumbnail"
android:layout_toRightOf="@+id/thumbnail" />
<TextView
android:id="@+id/textoListviewTipo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/textoListviewNombre"
android:layout_marginTop="1dip"
android:layout_toRightOf="@+id/thumbnail" />
<ImageView
android:id="@+id/imagenVisto"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:paddingLeft="3dp"
android:paddingRight="3dp" />
<ImageView
android:id="@+id/imagenVisto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />
</RelativeLayout>
благодаря
EDIT:
Новый код размещен. Мой textoListviewNombre не AlignTop с моей миниатюрой и на моей пиктограмме появляется мой imagenVisto
Это будет осуществляться путем создания пользовательского ListView –
да, я хочу пользовательский ListView – user3231711