android.widget.ExpandableListView.OnChildClickListener Java Examples
The following examples show how to use
android.widget.ExpandableListView.OnChildClickListener.
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: BlossomHomeFragment.java From android-project-wo2b with Apache License 2.0 | 6 votes |
@Override protected void bindEvents() { expandableListView.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { AlbumInfo albumInfo = (AlbumInfo) parent.getExpandableListAdapter().getChild(groupPosition, childPosition); Intent intent = new Intent(getContext(), ImageGridActivity.class); intent.putExtra(RockyIntent.EXTRA_ALBUM, albumInfo); startActivity(intent); return false; } }); }
Example #2
Source File: InviteFriendActivity.java From yiim_v2 with GNU General Public License v2.0 | 6 votes |
@Override protected void installListeners() { // TODO Auto-generated method stub mListView.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { // TODO Auto-generated method stub FriendItem item = new FriendItem(groupPosition, childPosition); if (mSelectedFriendItems.contains(item)) { mSelectedFriendItems.remove(item); } else { mSelectedFriendItems.add(item); } mAdapter.notifyDataSetChanged(); return false; } }); }
Example #3
Source File: GenericChannelsFragment.java From buddycloud-android with Apache License 2.0 | 6 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.channel_list, container, false); OnChildClickListener channelItemListener = new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { JSONObject channelItem = (JSONObject) adapter.getChild(groupPosition, childPosition); channelSelected(channelItem); return true; } }; ExpandableListView channelsView = (ExpandableListView) view.findViewById(R.id.channelListView); channelsView.setEmptyView(view.findViewById(R.id.channelListProgress)); channelsView.setAdapter(adapter); channelsView.setOnChildClickListener(channelItemListener); PauseOnScrollListener listener = new PauseOnScrollListener(ImageLoader.getInstance(), true, true); channelsView.setOnScrollListener(listener); expandAll(view); return view; }
Example #4
Source File: FragmentPage3.java From quickmark with MIT License | 5 votes |
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); final Calendar c = Calendar.getInstance();// 获取当前系统日期 defaultYear = c.get(Calendar.YEAR);// 获取年份 defaultMonth = c.get(Calendar.MONTH) + 1;// 获取月份 findViews(); initData(0); elv.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View view, int groupPosition, int childPosition, long id) { TextView txno = (TextView) view.findViewById(R.id.no); TextView txkind = (TextView) view.findViewById(R.id.kind); String strtype = ((String) txkind.getText()).substring(1, ((String) txkind.getText()).indexOf(']')).trim();// 从收入信息中截取收支类型 String strno = (String) txno.getText(); // 从信息中截取收支编号 Intent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象 if (strtype.equals("收入")) { intent.putExtra("cwp.message", new String[] { strno, "btnininfo" });// 设置传递数据 } if (strtype.equals("支出")) { intent.putExtra("cwp.message", new String[] { strno, "btnoutinfo" });// 设置传递数据 } intent.putExtra("cwp.id", userid); intent.putExtra("cwp.frament3", "3"); startActivity(intent);// 执行Intent操作 return false; } }); }