Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8012721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:24:48+00:00 2026-06-04T19:24:48+00:00

I have make one app in which i am display data in custom gridview

  • 0

I have make one app in which i am display data in custom gridview and its going well but problem is when i am scroll it and go to bottom and get back to top then all item position can change automatically.and some time it is not appear after scroll.here is my code i think some thing wrong with getView

@Override
    public View getView(int position, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub
        ViewHolder viewholder;
        // LayoutInflater inflator = activit.getLayoutInflater();



        if(convertView == null) { // recycled view is null so create it.
            viewholder = new ViewHolder();
        convertView = inflator.inflate(R.layout.gridviewrow, null);

        viewholder.imgvGridItem = (RelativeLayout) convertView
                .findViewById(R.id.rlGreidItemicon);
        viewholder.txtGridItemlabel = (TextView) convertView
                .findViewById(R.id.txtGridItemlabel);

            if ((lstpinfo.get(position).appname.toString()) != null) {

                viewholder.imgvGridItem.addView(getimageviewimage(lstpinfo
                        .get(position).icon));
                viewholder.txtGridItemlabel
                        .setText(lstpinfo.get(position).appname.toString());

            }
        }

        return convertView;

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:24:49+00:00Added an answer on June 4, 2026 at 7:24 pm

    looks convert view logic is not implemented fully.

    when you scroll, you get the not null convertView at that time you need to set new data in that and you are doing nothing in that case…….
    + you are not setting the ViewHolder in tag to get back it from convertView and use that.

    @Override
            public View getView(int position, View convertView, ViewGroup parent) {
                System.out.println("getView " + position + " " + convertView);
                ViewHolder holder = null;
    
                  if (convertView == null) {
                    convertView = mInflater.inflate(R.layout.item1, null);
                    holder = new ViewHolder();
                    holder.textView = (TextView)convertView.findViewById(R.id.text);
                    convertView.setTag(holder);
                } else {
                    holder = (ViewHolder)convertView.getTag();
                }
    
             holder.textView.setText(mData.get(position));//<========== see it .....
                return convertView;
            }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make simple minesweeper game in python, but have one problem. I have
I have two LINQ statements that I would like to make into one, but
I have one small online sale business but I want to make it scalable
I need to make the program which have one form that contains PNG image
I have a single-threaded linux app which I would like to make parallel. It
I'm trying to make one of the MenuItems on my Menu have a checkmark
So I have a huge program and decided I should make one of the
I have a window that contains one QTMovieView. How do I make it so
I need to have two UITableViews on one UIView. I can make it work
I am trying to make a Postgres PHP backup script. I have downloaded one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.