Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you just need to make sure you clean your state. Your adapter makes stars visible as your data shows it. However it doesn't ever make them GONE/INVISIBLE when they aren't. </p> <pre><code>ImageView[] images = new ImageView[5]; images[0] = (ImageView) view.findViewById(com.tour.R.id.slika1); images[1] = (ImageView) view.findViewById(com.tour.R.id.slika2); images[2] = (ImageView) view.findViewById(com.tour.R.id.slika3); images[3] = (ImageView) view.findViewById(com.tour.R.id.slika4); images[4] = (ImageView) view.findViewById(com.tour.R.id.slika5); for (ImageView image : images) { image.setVisibility(View.INVISIBLE); } for (int i = 0; i &lt; numberOfStars; i++) images[i].setVisibility(View.VISIBLE); </code></pre> <p>Also if you want you could cache that ImageView array to avoid the look up cost of traversing the tree each time you bind a cell. Like:</p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) { view = View.inflate(this.activity, com.tour.R.layout.third_level_list_item, null); ImageView[] images = new ImageView[5]; images[0] = (ImageView) view.findViewById(com.tour.R.id.slika1); images[1] = (ImageView) view.findViewById(com.tour.R.id.slika2); images[2] = (ImageView) view.findViewById(com.tour.R.id.slika3); images[3] = (ImageView) view.findViewById(com.tour.R.id.slika4); images[4] = (ImageView) view.findViewById(com.tour.R.id.slika5); view.setTag(images); } ImageView[] images = (ImageView[]) view.getTag(); for (ImageView image : images) { image.setVisibility(View.INVISIBLE); } for (int i = 0; i &lt; numberOfStars; i++) images[i].setVisibility(View.VISIBLE); return view; } </code></pre>
    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. VO
      singulars
      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