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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:28:14+00:00 2026-06-01T17:28:14+00:00

Blockquote I’m using ExpandableListView in android this is the code of getChildView in the

  • 0

Blockquote

I’m using ExpandableListView in android

this is the code of getChildView in the adapter class:

    @Override
    public View getChildView(int groupPosition, int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {
         ViewHolder holder; 
        if (convertView == null) {

            LayoutInflater inflater = (LayoutInflater) myContext
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = inflater.inflate(R.layout.childrow, null);
            holder = new ViewHolder(); 

            holder.tv = (TextView) convertView
                    .findViewById(R.id.textView1);
                            // I added this line of code
                holder.stop = (Button) convertView.findViewById(R.id.button3);

            holder.position = groupPosition;
            convertView.setTag(holder);
            holder.stop.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

               ViewHolder holder = new ViewHolder();
               holder = (ViewHolder) v.getTag();

                    int position = 0;

                        position = holder.position; ************* here

                    System.out.println("coolapse tag " + position);

                    expList.collapseGroup(position);


                }
            });

        } else {
             holder = (ViewHolder) convertView.getTag();
        }

        return convertView;
    }

It gives NullPointerException in the line marked by **
what is the problem ?

  • 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-01T17:28:16+00:00Added an answer on June 1, 2026 at 5:28 pm

    What is holder.stop? holder.stop is NOT the view where you set the tag, so when you try to do v.getTag(), you get a null in holder (incidentally, I did not see holder.stop being initialized). Not sure exactly what you’re going for, but a way to fix it would be to set the holder on the stop view as well:

    convertView.setTag(holder);
    holder.stop.setTag(holder);
    holder.stop.setOnClickListener(....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code on a style sheet I'm using: blockquote blockquote { margin:
I come across this: html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,d l,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,figure,footer,header,hgroup,menu,nav,section,menu,time,mark,audio,video{background:transparent;border:0;font-size:100%;list-style:none;margin:0;padding:0;outline:0;vertical-align:baseline;} The comment mention reset, I guess is used
not performing the validation in PersonaFisica .. Blockquote [MetadataType(typeof(IValidationPersona))] public class Persona : Entidad,
Edit: This is conflicting when I try @NiftyDude's addition. Most pages: $(blockquote).appendTo(.entry); <div class=entry>
If this code is a blockquote in my documentation, what do I need to
I have a friend who has code like this in his wordpress files: Blockquote
$('.testimonials blockquote p') .prepend('<span class=quo ldquo>&ldquo;</span>') .append('<span class=quo rdquo>&rdquo;</span>'); ...prepends and appends TWICE. How
can i parse my XML in this method Blockquote - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
Why this code showing error in W3C validator character data is not allowed here
I'm trying to style a blockquote to look like this: At the moment it

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.