Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom listview scrollin isn't smooth
    text
    copied!<p>I've created a custom listview which is working great apart from the fact that the list doesn't smooth scroll. Its choppy and slow.</p> <p>Here's the code where I populate the listview:</p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.listitem, null); } FilmRecord film = films.get(position); if (film != null) { TextView filmTitle = (TextView) v.findViewById(R.id.filmtitle); TextView filmShowingDate = (TextView) v.findViewById(R.id.filmshowingtime); TextView filmAdded = (TextView) v.findViewById(R.id.filmadded); TextView filmLocations = (TextView) v.findViewById(R.id.filmlocations); TextView filmDescription = (TextView) v.findViewById(R.id.filmdescription); TextView filmProvider = (TextView) v.findViewById(R.id.filmprovider); TextView filmTicketUrl = (TextView) v.findViewById(R.id.filmticketurl); if (filmTitle != null) { filmTitle.setText(film.filmTitle); } if(filmDescription != null) { filmDescription.setText(film.filmDescription ); } if(filmLocations != null) { filmLocations.setText(film.filmLocations ); } if(filmShowingDate != null) { filmShowingDate.setText("Showing: " + film.filmShowingDate ); } if(filmAdded != null) { filmAdded.setText("Added on: " + film.filmAdded ); } if(filmProvider != null) { filmProvider.setText(film.filmProvider ); } if(filmTicketUrl != null) { filmTicketUrl.setText(film.filmTicketUrl ); } } //Check who the provider is and set the imageview to provider logo ImageView imageView = (ImageView) v.findViewById(R.id.providerImage); if(film.filmProvider.equals("Cineworld")) { Log.d("Provider", "Provider is Cineworld"); imageView.setImageResource(R.drawable.cineworld); } else if(film.filmProvider.equals("Show Film Fist")){ Log.d("Provider", "Provider is Show Film Fist"); imageView.setImageResource(R.drawable.show_film_first); } return v; } </code></pre> <p>Has anyone had similar issues when creating a custom listview? Any help as always would be much appreciated :)</p>
 

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