Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • OnChlidClickListener

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 414
    Answer it

    Sir i want to use OnChildClickListener in my class which is extended to the ExpandableListView please help me out.

    My code is as follow.

    public class CustExpListview extends ExpandableListView implements ExpandableListView.OnChildClickListener {
    
        int intGroupPosition, intChildPosition, intGroupid;
        ArrayList<Team> team;
        public CustExpListview(Context context,ArrayList<Team> team)
        {
            super(context);
            this.team = team;
        }
    
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
        {
            widthMeasureSpec = MeasureSpec.makeMeasureSpec(960, MeasureSpec.AT&#95;MOST);
            heightMeasureSpec = MeasureSpec.makeMeasureSpec(900, MeasureSpec.AT&#95;MOST);
            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        }
    
        @Override
        public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
            Toast.makeText(getApplicationContext(), "Hello \t" + team.get(groupPosition).players.get(childPosition) , Toast.LENGTH&#95;LONG).show();
            return false;
        }
    }
    

 1 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: