Java Code Examples for android.widget.ExpandableListView#setOnGroupClickListener()

The following examples show how to use android.widget.ExpandableListView#setOnGroupClickListener() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: xmpp   File: FriendFragment.java    License: Apache License 2.0 6 votes vote down vote up
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (view == null) {
        DialogView.Initial(getActivity(), "正在加载好友列表......");
        view = inflater.inflate(R.layout.fragment_friend, container, false);
        map_is_open = new HashMap<>();
        list_is_open = new ArrayList<>();
        freshLayout = (SwipeRefreshLayout) view.findViewById(R.id.fragment_friend_swipe);
        freshLayout.setOnRefreshListener(this);
        freshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
                android.R.color.holo_green_dark,
                android.R.color.holo_red_light,
                android.R.color.holo_orange_dark);
        expandableListView = (ExpandableListView) view.findViewById(R.id.fragment_friend_expandableListView);
        expandableListView.setOnGroupClickListener(this);
        DialogView.show();
        getData();

    }


    return view;
}
 
Example 2
Source Project: Android   File: MainActivity.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
			
	mlistView = new ExpandableListView(this);                        
       mlistView.setOnGroupClickListener(this);        
       mlistView.setOnChildClickListener(this);
       
       List<GroupList> groups = new ArrayList<GroupList>();
       for( int i=0; i<mParentMenu.length; i++) {        	
       	List<GroupList> childs = new ArrayList<GroupList>();
       	for( int j=0; j<mChildMenu[i].length; j++ ) {
       		childs.add(new GroupListChild(mChildMenu[i][j]));
       	}
       	groups.add(new GroupListParent(mParentMenu[i],childs));
       }

       mAdapter = new GroupListAdapter(this,groups);
       mlistView.setAdapter(mAdapter);
       
       setContentView(mlistView);		
}
 
Example 3
/**
 * {@inheritDoc}
 *
 * @see org.emdev.ui.AbstractActionActivity#onCreateImpl(android.os.Bundle)
 */
@Override
protected void onCreateImpl(final Bundle savedInstanceState) {

    setContentView(R.layout.opds);
    setActionForView(R.id.opdsaddfeed);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    
    final OPDSActivityController c = getController();

    list = (ExpandableListView) findViewById(R.id.opdslist);
    list.setGroupIndicator(null);
    list.setChildIndicator(null);
    list.setOnGroupClickListener(c);
    list.setOnChildClickListener(c);
    list.setAdapter(c.adapter);

    this.registerForContextMenu(list);
}
 
Example 4
Source Project: qplayer-sdk   File: SettingView.java    License: MIT License 5 votes vote down vote up
private void init() {    	
    mInflater = LayoutInflater.from(this);
    initData();
    mAdapter = new MyExpandableListViewAdapter();
    mListView = (ExpandableListView) findViewById(R.id.my_list);
    mListView.setAdapter(mAdapter);
    mListView.setOnGroupClickListener(this);
    mListView.setOnChildClickListener(this);
    mListView.setOnGroupExpandListener(this);
}
 
Example 5
private void testExpandListView() {
    //可以参考 08 ListView & ExpaadableListView
    ExpandableListView expandableListView = new ExpandableListView(this);
    expandableListView.setOnGroupClickListener((expandableListView1, view, i, l) -> false);
    expandableListView.setOnChildClickListener((expandableListView12, view, i, i1, l) -> false);
}