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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:18:21+00:00 2026-06-10T03:18:21+00:00

Geting List Size is 46. i am getting all the value inside constrator .

  • 0

Geting List Size is 46.
i am getting all the value inside constrator .
getView is not calling,

My Code Below,

  public class Atom_1_Adapter extends BaseAdapter {

                private Activity activity;
                    List<MsgStandard> msgList1=new ArrayList<MsgStandard>();
                private LayoutInflater inflater=null;
                ImageLoader imageLoader;    
                int size=0;
                String tag="Atom_1_Adapter";

            public Atom_1_Adapter(Activity activity, List<MsgStandard> msgList1) {
                    this.activity = activity;
  this.msgList1 = msgList1
                    size=this.msgList1.size();
                    inflater = (LayoutInflater)this.activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                    imageLoader=new ImageLoader(activity);
                }

        @Override
            public int getCount() {
                return size;
            }

            @Override
            public Object getItem(int position) {
                return position;
            }

            @Override
            public long getItemId(int position) {
                return position;
            }

        class ViewHolder{
                ImageView image1,image2;
        }
            @Override
            public View getView(final int position, View convertView, ViewGroup parent) {
                System.out.println("enter get view--->>>>>>");
                View vi=convertView;
                ViewHolder holder=new ViewHolder();
                try{
                    vi=inflater.inflate(R.layout.homepagelist_1_adapter,null);

        //here my layout declaration


        vi.setTag(holder);

        //here set value for TextView,ImageView... etc

        return vi;

        }catch{}
        }
        }

Thanks,

  • 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-10T03:18:23+00:00Added an answer on June 10, 2026 at 3:18 am

    Try this.

    Change you constructor code .

    public Atom_1_Adapter(Activity activity, List<MsgStandard> msgList1) 
    {
       this.activity = activity;
       this.msgList1 = msgList1
       size=this.msgList1.size();
       inflater = (LayoutInflater)this.activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       imageLoader=new ImageLoader(activity);
    }
    

    Note : this.msgList1.size() is consider as class variable which you declare in your Adapter Class . So if you want to find the size of List which is passed in function then you need to remove this infront of msgList1.size() in your constructor. And Assign this.msgList1 = msgList1; . Look My Code

    public View getView(int position, View convertView, ViewGroup parent) 
    {
        ViewHolder holder;
    
        if (convertView == null) 
        {
            convertView = mInflater.inflate(R.layout.menu_row, null);
            holder = new ViewHolder();
    
            holder.textViewMenuName = (TextView)convertView.findViewById(R.id.textViewMenuName);
            convertView.setTag(holder);
        }
        else 
        {
            holder = (ViewHolder) convertView.getTag();
        }
    
        holder.textViewMenuName.setText("Test");
                return convertView;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the code below for getting a list of child processes on windows
Im getting the following error for the piece of code below : expression list
I keep getting a 'List does not exist' error whenever I try and use
The code below gets the information i require from my database but is not
how to get count with a namedquery, without getting all the list (it would
I have a question - I'm using CURL and PROXY. I'm getting list with
I am getting a list of products from my database as a BindingList. I
I am getting from database list of items ordered by descending date. I use
Im iterating a list and getting hold of 2 fields Name and Url i
I am populating the list view with data I am getting from a JSON

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.