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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:53:07+00:00 2026-05-23T00:53:07+00:00

public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View

  • 0
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
    View v = null;
    if( convertView != null )
        v = convertView;
    else
        v = inflater.inflate(R.layout.child_row, parent, false); 
    Color c = (Color)getChild( groupPosition, childPosition );
    TextView color = (TextView)v.findViewById( R.id.childname );
    if( color != null )
        color.setText( c.getColor() );
    TextView rgb = (TextView)v.findViewById( R.id.rgb );
    if( rgb != null )
        rgb.setText( c.getRgb() );
    //  CheckBox cb = (CheckBox)v.findViewById( R.id.check1 );
    //  cb.setChecked( c.getState() );
    Button btnPlay=(Button)v.findViewById(R.id.Play);
    Button btnDelete=(Button)v.findViewById(R.id.Delete);
    Button btnEmail=(Button)v.findViewById(R.id.Email);
    btnPlay.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            Log.i("TEST ", "play btn cliked");

            Intent i=new Intent(this,FindFilesByType.class);//THIS IS NOT ALLOWED IN MY CODE

        }
    });

    return v;
}

In the code above, I’ve written my adapterclass.
There are 3 buttons in my explandable list as a child.
I want to call another Java class on button’s click event,
so, when I am using:

Intent i=new Intent(this,FindFilesByType.class);

I am getting this:

The constructor Intent(new View.OnClickListener(){}, Class<FindFilesByType>) is undefined
Remove arguments to match 'Intent'

What is wrong with what I am doing?

  • 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-05-23T00:53:08+00:00Added an answer on May 23, 2026 at 12:53 am
    public View getChildView(int groupPosition, int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {
        View v = null;
        if (convertView != null)
            v = convertView;
        else
            v = inflater.inflate(R.layout.child_row, parent, false);
        Rington c = (Rington) getChild(groupPosition, childPosition);
        TextView color = (TextView) v.findViewById(R.id.childname);
        if (color != null)
            color.setText(c.getColor());
        TextView rgb = (TextView) v.findViewById(R.id.rgb);
        if (rgb != null)
            rgb.setText(c.getRgb());
    
        Button btnPlay = (Button) v.findViewById(R.id.Play);
        Button btnDelete = (Button) v.findViewById(R.id.Delete);
        Button btnEmail = (Button) v.findViewById(R.id.Email);
        btnPlay.setOnClickListener(new View.OnClickListener() {
    
            @Override
            public void onClick(View arg0) {
                //code
    
            }
        });
        btnDelete.setOnClickListener(new View.OnClickListener() {
    
            @Override
            public void onClick(View arg0) {
                //code
    
            }
        });
        btnEmail.setOnClickListener(new View.OnClickListener() {
    
            @Override
            public void onClick(View arg0) {
                //code
            }
        });
    
        return v;
    }
    

    this above methos into the adapter class this is fully working code for me 🙂

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

Sidebar

Related Questions

I want to inflate a childView of ExpandableChildView component. Code: public View getChildView(int groupPosition,
I've that in my Adapter : public View getView(int position, View convertView, ViewGroup parent)
@Override public View getView(final int position, View convertView, ViewGroup parent) { View v =
this is my getView method: public View getView(final int position, View convertView, final ViewGroup
I use this code in my getView: @Override public View getView(int position, View convertView,
i have 2 actions public ActionResult FilesAdd(int id) { FillParentMenuDDL(id); return View(); } [HttpPost]
I try to create listView dynamically from code with: @Override public View getView(int position,
Here is my custom adapter: ... @Override public View newView(Context context, Cursor cursor, ViewGroup
Ok, now this is my SimpleAdapter's getView function: @Override public View getView(int position, View
I have the following getView in the BaseAdapter. @Override public View getView(int position, View

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.