Note that there are some explanatory texts on larger screens.

plurals
  1. POScrollable ListView with customized BaseAdapter is very slow
    primarykey
    data
    text
    <p>I have a customized BaseAdapter for my listView with this code:</p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { } else { holder = (ViewHolder) convertView.getTag(); } convertView = mInflater.inflate(R.layout.user_submissions_customisation, null); holder = new ViewHolder(); holder.JournalName = (TextView) convertView.findViewById(R.id.JournalName); holder.SubmissionTitle = (TextView) convertView.findViewById(R.id.SubmissionTitle); holder.SubmissionDate = (TextView) convertView.findViewById(R.id.SubmissionDate); holder.statusOk=(ImageView)convertView.findViewById(R.id.statusOkImage); holder.statusRejected=(ImageView)convertView.findViewById(R.id.statusRejectedImage); holder.statusProcessing=(ImageView)convertView.findViewById(R.id.statusProcessingImage); convertView.setTag(holder); ImageView statusOk=(ImageView)convertView.findViewById(R.id.statusOkImage); ImageView statusRejected=(ImageView)convertView.findViewById(R.id.statusRejectedImage); ImageView statusProcessing=(ImageView)convertView.findViewById(R.id.statusProcessingImage); MDPIActivity mdpi = new MDPIActivity(); Context context =mdpi.getContext(); LocalDatabase localDatabase = new LocalDatabase(context); //Instantiation of the DB int status = localDatabase.getSubmissionStatus(position+1); if (status==102 | status==19) { statusRejected.setVisibility(View.VISIBLE); } else { if (status==29) { statusOk.setVisibility(View.VISIBLE); } else { statusProcessing.setVisibility(View.VISIBLE); } } holder.JournalName.setText(submissionsArrayList.get(position).getJournalTitle()+"-"+submissionsArrayList.get(position).getID()); holder.SubmissionTitle.setText(submissionsArrayList.get(position).getTitle()); holder.SubmissionDate.setText(submissionsArrayList.get(position).getDate()); return convertView; } static class ViewHolder { TextView JournalName; TextView SubmissionTitle; TextView SubmissionDate; ImageView statusOk; ImageView statusRejected; ImageView statusProcessing; } </code></pre> <p>All works wel but the creation of the list on the display and the scrolling is pretty slow. I used this for éy list too:</p> <pre><code>android:fastScrollEnabled="true" android:scrollingCache="true" android:smoothScrollbar="true" </code></pre> <p>But the view changing from the previeous view to the listview is slow and the scrolling of the list too.</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.
 

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