ExpandableListView setOnGroupCollapseListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ExpandableListView setOnGroupCollapseListener method.

This code example shows how to use the following methods:setVisibility, startAnimation, setAdapter, setOnChildClickListener, setOnGroupCollapseListener
     */ 
    public void setListAdapter(ExpandableListAdapter adapter) {
        boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if (mList != null) {
            mList.setAdapter(adapter);
            if (!mListShown && !hadAdapter) {
                // The list was hidden, and previously didn't have an 
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null);
            } 
        } 
    } 
 
    /** 
     * Set the currently selected list item to the specified 
     * position with the adapter's data 
     * 
     * @param position 
     */ 

8
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView
     */ 
    public void setListAdapter(ExpandableListAdapter adapter) {
        boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if (mExpandableList != null) {
            mExpandableList.setAdapter(adapter);
            if (!mExpandableListShown && !hadAdapter) {
                // The list was hidden, and previously didn't have an 
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null);
            } 
        } 
    } 
 
    /** 
     * Set the currently selected list item to the specified 
     * position with the adapter's data 
     * 
     * @param position 
     */ 

6
CodeRank
This code example shows how to use the following methods:setId, setDrawSelectorOnTop, setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener
		tv.setId(INTERNAL_EMPTY_ID);
		tv.setGravity(Gravity.CENTER);
		root.addView(tv,
				new FrameLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
 
		ExpandableListView lv = new ExpandableListView(getActivity());
		lv.setId(android.R.id.list);
		lv.setDrawSelectorOnTop(false);
		lv.setOnChildClickListener(this);
		lv.setOnGroupExpandListener(this);
		lv.setOnGroupCollapseListener(this);
 
		root.addView(lv, new FrameLayout.LayoutParams(
				ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
 
		ListView.LayoutParams lp =
				new ListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
		root.setLayoutParams(lp);
 
		return root;
7
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupClickListener, setOnGroupCollapseListener, setOnGroupExpandListener
	 */ 
	public void setListAdapter(ExpandableListAdapter adapter) {
		boolean hadAdapter = mAdapter != null;
		mAdapter = adapter;
		if (mList != null) {
			mList.setAdapter(adapter);
			if (!mListShown && !hadAdapter) {
				// The list was hidden, and previously didn't have an 
				// adapter. It is now time to show it. 
				setListShown(true, getView().getWindowToken() != null); 
			} 
		} 
	} 
 
	/** 
	 * Set the currently selected list item to the specified position with the adapter's data 
	 *  
	 * @param position 
	 */ 
	public void setSelection(int position) {

6
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView
    /** Provide the cursor for the list view. */ 
    public void setListAdapter(ExpandableListAdapter adapter) {
        boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if (mList != null) {
            mList.setAdapter(adapter);
            if (!mListShown && !hadAdapter) {
                // The list was hidden, and previously didn't have an 
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null);
            } 
        } 
    } 
 
    /** 
     * Set the currently selected list item to the specified 
     * position with the adapter's data 
     */ 
    public void setSelection(int position) {
        ensureList(); 

5
CodeRank
This code example shows how to use the following methods:setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView, setOnItemLongClickListener
    if (expandableListView == null) {
      throw new RuntimeException("Your content must have a ExpandableListView whose id attribute is "
          + "'android.R.id.list'"); 
    } 
    if (emptyView != null) {
      expandableListView.setEmptyView(emptyView);
    } 
    expandableListView.setOnChildClickListener(this);
    expandableListView.setOnGroupExpandListener(this);
    expandableListView.setOnGroupCollapseListener(this);
    expandableListView.setOnItemLongClickListener(this);
 
    if (mFinishedStart) {
      setListAdapter(mAdapter);
    } 
    mFinishedStart = true;
  } 
 
  @Override 
  public void setSelectedGroup(int groupPosition) {
5
CodeRank
This code example shows how to use the following methods:setOnChildClickListener, setOnGroupClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView
                                + "that is not a rawExpandableListView class"); 
            } 
            mExpandableList = (ExpandableListView)rawExpandableListView;
 
            if (mEmptyView != null) {
                mExpandableList.setEmptyView(mEmptyView);
            } else if (mEmptyText != null) {
                mStandardEmptyView.setText(mEmptyText);
                mExpandableList.setEmptyView(mStandardEmptyView);
            } 
        } 
        mListShown = true;
 
 
        mExpandableList.setOnGroupClickListener(this);
        mExpandableList.setOnChildClickListener(this);
        mExpandableList.setOnGroupExpandListener(this);
        mExpandableList.setOnGroupCollapseListener(this);
 
        /*mExpandableList.setOnItemClickListener(mOnClickListener);*/ 

5
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView
    /** Provide the cursor for the list view. */ 
    public void setListAdapter(ExpandableListAdapter adapter) {
        boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if (mList != null) {
            mList.setAdapter(adapter);
            if (!mListShown && !hadAdapter) {
                // The list was hidden, and previously didn't have an 
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null);
            } 
        } 
    } 
 
    /** 
     * Set the currently selected list item to the specified 
     * position with the adapter's data 
     */ 
    public void setSelection(int position) {
        ensureList(); 

5
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupClickListener, setOnGroupCollapseListener, setOnGroupExpandListener
     */ 
    public void setListAdapter(final ExpandableListAdapter adapter){
        final boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if(mList != null){
            mList.setAdapter(adapter);
            if(!mListShown && !hadAdapter){
                // The list was hidden, and previously didn't have an 
                // adapter.  It is now time to show it. 
                setListShown(true, getView().getWindowToken() != null);
            } 
        } 
    } 
 
    /** 
     * Sets the selection to the specified group. 
     *  
     * @param groupPosition The position of the group that should be selected. 
     */ 
    public void setSelectedGroup(final int groupPosition){

5
CodeRank
This code example shows how to use the following methods:setAdapter, setOnChildClickListener, setOnGroupCollapseListener, setOnGroupExpandListener, setEmptyView
	 */ 
	public void setListAdapter(ExpandableListAdapter adapter) {
		boolean hadAdapter = mAdapter != null;
		mAdapter = adapter;
		if (mList != null) {
			mList.setAdapter(adapter);
			if (!mListShown && !hadAdapter) {
				// The list was hidden, and previously didn't have an 
				// adapter.  It is now time to show it. 
				setListShown(true, getView().getWindowToken() != null);
			} 
		} 
	} 
 
	/** 
	 * Set the currently selected list item to the specified 
	 * position with the adapter's data 
	 * 
	 * @param position 
	 */ 

5
CodeRank

Related ExpandableListView setOnGroupCollapseListener Questions & Answers:

Other ExpandableListView setOnGroupCollapseListener Examples

61:	
62:			// Listview Group collasped listener
63:			expListView.setOnGroupCollapseListener(new OnGroupCollapseListener() {
64:	
65:				@Override

Read More

setOnGroupCollapseListener Method Overview
See Code Examples for other Android ExpandableListView Methods: