Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom adapter does not called getVIew
    primarykey
    data
    text
    <p>Here is the code of my custom adapter... it doesn't call my get view... returns only white blank page without nothing. I don't know what is the problem. Does anybody can help. Thanks a lot previously! </p> <pre><code> public class ProductShopsAdapter extends ArrayAdapter&lt;ProductShop&gt; { private Context cntx; private ArrayList&lt;ProductShop&gt; shopValues; ProductShopsHolder holder = null; public ProductShopsAdapter(Context context, int textViewResourceId, ArrayList&lt;ProductShop&gt; stringValues) { super(context,textViewResourceId); shopValues = stringValues; cntx = context; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { holder = new ProductShopsHolder(); LayoutInflater layoutInflater = (LayoutInflater)cntx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = layoutInflater.inflate(R.layout.shops_list, null); //Holder Elements initialization holder.setShopName((TextView)convertView.findViewById(R.id.shop_name)); holder.setPrice((TextView)convertView.findViewById(R.id.shop_part_price)); convertView.setTag(holder); } else { holder = (ProductShopsHolder) convertView.getTag(); } holder.getShopName().setText(getItem(position).getShopName()); holder.getPrice().setText(getItem(position).getPrice()); return convertView; } } </code></pre> <p>and here is my XML</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".ProductShopsActivity" &gt; &lt;ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/footer" android:padding="0dp" &gt; &lt;/ListView&gt; &lt;include android:id="@+id/footer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignLeft="@android:id/list" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" layout="@layout/footer_menu" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>and single view : </p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_item" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#f2f2f2" android:orientation="horizontal" android:padding="10dp" &gt; &lt;TextView android:id="@+id/shop_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:text="Technomarket" android:textSize="14sp" /&gt; &lt;TextView android:id="@+id/shop_part_price" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:text="30 лв." android:textSize="18sp" /&gt; &lt;TextView android:id="@+id/details_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:drawableRight="@drawable/rightarrow" android:gravity="center" android:text="Детайли" android:textColor="#289bd6" android:textSize="14sp" /&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload