Java Code Examples for android.widget.ExpandableListView#setOnGroupClickListener()
The following examples show how to use
android.widget.ExpandableListView#setOnGroupClickListener() .
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 check out the related API usage on the sidebar.
Example 1
Source File: FriendFragment.java From xmpp with Apache License 2.0 | 6 votes |
@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 File: MainActivity.java From Android with Apache License 2.0 | 6 votes |
@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
Source File: OPDSActivity.java From document-viewer with GNU General Public License v3.0 | 6 votes |
/** * {@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 File: SettingView.java From qplayer-sdk with MIT License | 5 votes |
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
Source File: DataBindingLambdaActivity.java From sa-sdk-android with Apache License 2.0 | 4 votes |
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); }