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 8226875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:55:48+00:00 2026-06-07T15:55:48+00:00

I have developed an app in which I display data in Gridview . All

  • 0

I have developed an app in which I display data in Gridview. All data comes from local storage. I am able to display each data correctly and there are no issues with it. But when I have scroll the Gridview and goto the bottom and getback to Top,it changes position. And sometimes when I scroll down and getback to Top, a blank screen appears on screen;no data found at all!

So I thought that there is issue with getView(). I am unable to figure out the problem

Code of 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.imgvGridicon = (ImageView) convertView.findViewById(R.id.imgvGridicon);
        viewholder.txtGridItemlabel = (TextView) convertView.findViewById(R.id.txtGridItemlabel);
        convertView.setTag(viewholder); 
    } else {
        viewholder = (ViewHolder) convertView.getTag();      
    }  
    if ((lstpinfo.get(position).appname.toString()) != null) {
        viewholder.imgvGridicon.setImageDrawable((lstpinfo.get(position).icon));
        viewholder.txtGridItemlabel.setText(lstpinfo.get(position).appname.toString());
    }
    return convertView;
}

Update::
Intitalize of inflater::

private LayoutInflater inflator;

     private ArrayList<PInfo> lstpinfo = new ArrayList<PInfo>();
     public GridViewAdapter(Context cntx, ArrayList<PInfo> lstpinfo) {

            activit = cntx;
            inflator = LayoutInflater.from(cntx);
            this.lstpinfo = lstpinfo;

        }
  • 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-07T15:55:49+00:00Added an answer on June 7, 2026 at 3:55 pm

    You have to set your view height with fixed value. There’s a scrolling bug in android gridview with different heights. Please see this for reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a blackberry app, in which I am using Persistent Storage to
I have developed the ipad app which displays images and other product details from
i have developed an app which executes sql jobs. When I click on execute
I have current a developed app which I am going to submit in just
I have enrolled in the iOS developer's program. I've developed an app which I
I have developed a system app for my rom which includes some native libraries.
I have developed my app using core data. It works fine in the simulator.
i have developed one application in which getting install app information like name,package name,
I have musical app developed for OS X, which has following features, Play multiple
I have developed one application which has 15 screens. Now I want to display

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.