Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ListView 的 ViewHolder的, 代码里不应该是判mConvertView为空否去new holder吗,通过tag获取也应该是mConvertView吧?

Open
#105 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

The issue centers on ViewHolder.get(Context, View convertView, ...), with the relevant recycling and tag lookup shown in the report. Start by tracing how ListView supplies recycled views and how the holder is stored and retrieved; done means the intended lookup path is confirmed and the reported behavior is covered by a test or clearly documented.

Written by the indexing model from the issue text.

Description

public static ViewHolder get(Context context, View convertView,
ViewGroup parent, int layoutId, int position)
{
if (convertView == null)
{
View itemView = LayoutInflater.from(context).inflate(layoutId, parent,
false);
ViewHolder holder = new ViewHolder(context, itemView, parent, position);
holder.mLayoutId = layoutId;
return holder;
} else
{
ViewHolder holder = (ViewHolder) convertView.getTag();
holder.mPosition = position;
return holder;
}
}

Dominant language
Java
Stars
4.7k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hongyangAndroid/baseAdapter

All issues in hongyangAndroid/baseAdapter

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.