List of usage examples for android.widget ExpandableListView setAdapter
public void setAdapter(ExpandableListAdapter adapter)
From source file:com.vrem.wifianalyzer.wifi.AccessPointsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { FragmentActivity activity = getActivity(); View view = inflater.inflate(R.layout.access_points_content, container, false); swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.accessPointsRefresh); swipeRefreshLayout.setOnRefreshListener(new ListViewOnRefreshListener()); ExpandableListView expandableListView = (ExpandableListView) view.findViewById(R.id.accessPointsView); expandableListView.setAdapter(new AccessPointsAdapter(activity, getScanner())); return view;//ww w .j ava2 s . c o m }
From source file:com.aqnote.app.wifianalyzer.wifi.AccessPointsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { FragmentActivity activity = getActivity(); View view = inflater.inflate(R.layout.access_points_content, container, false); swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.accessPointsRefresh); swipeRefreshLayout.setOnRefreshListener(new ListViewOnRefreshListener()); accessPointsAdapter = new AccessPointsAdapter(activity); ExpandableListView expandableListView = (ExpandableListView) view.findViewById(R.id.accessPointsView); expandableListView.setAdapter(accessPointsAdapter); Scanner scanner = MainContext.INSTANCE.getScanner(); scanner.register(accessPointsAdapter); return view;/*from w ww .j av a 2 s. com*/ }
From source file:com.vrem.wifianalyzer.wifi.accesspoint.AccessPointsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { FragmentActivity activity = getActivity(); View view = inflater.inflate(R.layout.access_points_content, container, false); swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.accessPointsRefresh); swipeRefreshLayout.setOnRefreshListener(new ListViewOnRefreshListener()); accessPointsAdapter = new AccessPointsAdapter(activity); ExpandableListView expandableListView = (ExpandableListView) view.findViewById(R.id.accessPointsView); expandableListView.setAdapter(accessPointsAdapter); accessPointsAdapter.setExpandableListView(expandableListView); Scanner scanner = MainContext.INSTANCE.getScanner(); scanner.register(accessPointsAdapter); return view;// w w w . j a va 2s . com }
From source file:kr.co.generic.wifianalyzer.wifi.AccessPointsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { FragmentActivity activity = getActivity(); View view = inflater.inflate(kr.co.generic.wifianalyzer.R.layout.access_points_content, container, false); swipeRefreshLayout = (SwipeRefreshLayout) view .findViewById(kr.co.generic.wifianalyzer.R.id.accessPointsRefresh); swipeRefreshLayout.setOnRefreshListener(new ListViewOnRefreshListener()); accessPointsAdapter = new AccessPointsAdapter(activity); ExpandableListView expandableListView = (ExpandableListView) view .findViewById(kr.co.generic.wifianalyzer.R.id.accessPointsView); expandableListView.setAdapter(accessPointsAdapter); Scanner scanner = MainContext.INSTANCE.getScanner(); scanner.register(accessPointsAdapter); return view;//from ww w . j a v a2 s. co m }
From source file:android.hawkencompanionapp.activities.UserAccountMainActivity.java
private void setupNavDrawer() { final ExpandableListView lv = (ExpandableListView) findViewById(R.id.nav_drawer_expandable_list_view); lv.setAdapter(new NavBarExpandableListAdapter(this, mNavBarCategoryList)); lv.setOnChildClickListener(this); }
From source file:org.maikelwever.droidpile.ViewMessageActivity.java
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.messagesToDownload = new ArrayDeque<String>(); this.mailpileMessage = new MailpileMessage(getIntent().getExtras()); adapter = new MessageExpandableListAdapter(ViewMessageActivity.this, getFragmentManager()); getSupportActionBar().setTitle(this.mailpileMessage.title); View vi = getLayoutInflater().inflate(R.layout.activity_view_message, null); ExpandableListView listView = (ExpandableListView) vi.findViewById(R.id.view_message_listview); listView.setAdapter(adapter); setContentView(vi);// ww w. j a v a2s . co m if (this.parsedMessage == null) { new FetchMessageTask().execute(mailpileMessage.messageId); progressDialog = ProgressDialog.show(ViewMessageActivity.this, "", getString(R.string.download_please_wait), true, true); } }
From source file:com.darizotas.metadatastrip.FileDetailFragment.java
/** * Updates the view with the metadata contained in the selected file that this fragment * is presenting.//from ww w. j a v a 2 s .c o m * @param view View */ private void updateFileDetails(View view) { GroupContainer container = mFileMetadata.getMetadata(); SimpleExpandableListAdapter adapter = new SimpleExpandableListAdapter(getActivity(), // List of groups container.getGroups(), R.layout.fragment_detail_rowgroup, new String[] { GroupContainer.KEY_GROUP_TEXT }, new int[] { R.id.group_name }, // List of metadata, per group. container.getAllMetadata(), R.layout.fragment_detail_rowtag, new String[] { GroupContainer.KEY_TAG_NAME, GroupContainer.KEY_TAG_VALUE }, new int[] { R.id.tag_name, R.id.tag_value }); ExpandableListView details = (ExpandableListView) view.findViewById(R.id.detail_list); details.setAdapter(adapter); }
From source file:eu.operando.operandoapp.wifi.AccessPointsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { setTheme(MainContext.INSTANCE.getSettings().getThemeStyle().themeAppCompatStyle()); super.onCreate(savedInstanceState); setContentView(R.layout.access_points_content); swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.accessPointsRefresh); swipeRefreshLayout.setOnRefreshListener(new ListViewOnRefreshListener()); ExpandableListView expandableListView = (ExpandableListView) findViewById(R.id.accessPointsView); accessPointsAdapter = new AccessPointsAdapter(this); expandableListView.setAdapter(accessPointsAdapter); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setOnClickListener(new WiFiBandToggle()); setSupportActionBar(toolbar);/*from www . j ava 2 s . c om*/ ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { setTitle(R.string.action_access_points); updateSubTitle(); Bundle extras = getIntent().getExtras(); Boolean fromNotification = (getIntent().getExtras() != null) ? extras.getBoolean("fromNotification", false) : false; actionBar.setHomeButtonEnabled(!fromNotification); actionBar.setDisplayHomeAsUpEnabled(!fromNotification); } }
From source file:org.peercast.core.PeerCastFragment.java
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setHasOptionsMenu(true);/*ww w . ja v a 2 s . c o m*/ AppCompatActivity act = (AppCompatActivity) getActivity(); ActionBar actionBar = act.getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setTitle(R.string.app_name); ExpandableListView lv = (ExpandableListView) getView().findViewById(R.id.vListChannel); mListAdapter = new GuiListAdapter(getContext()); lv.setAdapter(mListAdapter); registerForContextMenu(lv); }
From source file:org.alfresco.mobile.android.application.fragments.workflow.task.TaskFilterFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setRetainInstance(true);// w ww .j a v a2s . com View rootView = inflater.inflate(R.layout.app_task_filters, container, false); setSession(SessionUtils.getSession(getActivity())); SessionUtils.checkSession(getActivity(), getSession()); ExpandableListView expandableList = (ExpandableListView) rootView.findViewById(R.id.filters_list); expandableList.setGroupIndicator(null); expListAdapter = new TaskFilterExpandableAdapter(getActivity(), selectedItems); expandableList.setAdapter(expListAdapter); expandableList.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { expListAdapter.select(v, groupPosition, childPosition); return false; } }); Button validate = UIUtils.initValidation(rootView, R.string.task_filter_view, true); validate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ListingContext lc = new ListingContext(); ListingFilter lf = TasksHelper.createFilter(selectedItems.values()); lc.setFilter(lf); TasksFragment.with(getActivity()).setListingContext(lc).display(); } }); return rootView; }