Custom Listview Not Appearing

Asked

Viewed 42 times

0

I am trying to create a custom Listview. In another project I created a row_client xml and in Listview I put tools:listitem="@layout/row_cliente", but it doesn’t trim my custom list but rather the default list. Someone knows why ?

Listview Personalizado:

ListView Personalizado Listview Padrão:

ListView Normal Listview code:

<ListView
    android:id="@+id/listViewCliente"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:listitem="@layout/row_cliente">

Code of the row_client

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <TextView
        android:text="TextView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:id="@+id/textView3"
        android:paddingLeft="100dp"
        android:layout_weight="1"
        android:textAppearance="@style/TextAppearance.AppCompat.Large" />

    <ImageView
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:srcCompat="@drawable/ic_menu_send"
        android:id="@+id/imageView2"
        android:layout_weight="1" />

  • Post layout and source code to better contextualize the question.

  • Are you using Basedapter or a custom Adapter? It may be the problem

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.