Code example for ExpandableListView

Methods: expandGroupsetSelectedChild

0
        try { // Check if the parent activity is the IndicatorActivity. only need to track indicator selection here 
			 
			act = (IndicatorActivity) getActivity();
			mAdapter.setSelectedPosition(act.getGroupPosition(), act.getChildPosition());
			 
			menuList.setSelectedChild(act.getGroupPosition(), act.getChildPosition(), true);
			menuList.expandGroup(act.getGroupPosition());
			 
		} catch (ClassCastException actException) {// otherwise leave list collapsed
			//hAct = (HomeActivity) getActivity(); 
			mAdapter.setSelectedPosition(-1);
			 
		} 
         
 
    } 
     
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState){
Experience pair programming with AI  Get Codota for Java