Note that there are some explanatory texts on larger screens.

plurals
  1. POBaseAdapter don't hide layout with setVisibility(View.GONE)
    primarykey
    data
    text
    <p>I have a little problem. I have class</p> <pre><code>private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; public EfficientAdapter(Context context) { mInflater = LayoutInflater.from(context); } // return size of elements public int getCount() { return BridgeJSON.listFromJSON.getItem().size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { position_move = 0; convertView = mInflater.inflate(R.layout.row, null); holder = new ViewHolder(); holder.txt_description = (TextView) convertView .findViewById(R.id.description_event); ...... convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } if (listFromJSON.getItem().get(position).isViewed() == false) { convertView.setBackgroundColor(Color.RED); this.notifyDataSetChanged(); } else { // get text for description String txt_for_description = listFromJSON.getItem().get( position - position_move).getDescr(); .......... } return convertView; } static class ViewHolder { TextView txt_description; TextView txt_time; TextView txt_title; TextView txt_place; } } </code></pre> <p>When I do that, method <code>convertView.setBackgroundColor(Color.RED)</code> work great, what I need Image is there: <a href="http://dl.dropbox.com/u/866867/stack/device2.png" rel="nofollow noreferrer">dl.dropbox.com/u/866867/stack/device2.png</a></p> <p>but when I want to remove that item, I can't do it. I add there <code>convertView.setVisibility(View.GONE);</code> , but have empty item, beside hide it. I read that parameter <code>View.INVISIBLE</code> won't hide layout, but <code>View.GONE</code> have, but in my code, doesn't(((</p> <p>And that image: <a href="http://dl.dropbox.com/u/866867/stack/device.png" rel="nofollow noreferrer">http://dl.dropbox.com/u/866867/stack/device.png</a></p>
    singulars
    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.
    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