List of usage examples for android.widget ListView removeFooterView
public boolean removeFooterView(View v)
From source file:com.todoroo.astrid.actfm.CommentsFragment.java
private void addFooterToListView(ListView listView) { if (footerView != null) { listView.removeFooterView(footerView); }/*from w w w . j a v a 2s . c om*/ footerView = null; }
From source file:com.todoroo.astrid.actfm.CommentsFragment.java
protected void refreshUpdatesList() { Activity activity = getActivity();//from w w w . ja va2 s .co m View view = getView(); if (activity == null || view == null) { return; } Cursor cursor; ListView listView = ((ListView) view.findViewById(android.R.id.list)); if (updateAdapter == null) { cursor = getCursor(); activity.startManagingCursor(cursor); updateAdapter = new UpdateAdapter(this, R.layout.update_adapter_row, cursor); addHeaderToListView(listView); addFooterToListView(listView); listView.setAdapter(updateAdapter); } else { cursor = updateAdapter.getCursor(); cursor.requery(); activity.startManagingCursor(cursor); if (footerView != null) { listView.removeFooterView(footerView); footerView = null; } } listView.setVisibility(View.VISIBLE); }
From source file:org.deviceconnect.android.deviceplugin.health.fragment.HealthCareDeviceSettingsFragment.java
private void onClickScanButton() { final ListView listView = (ListView) mRootView.findViewById(R.id.device_list_view); Button button = (Button) mRootView.findViewById(R.id.button_scan); if (mIsScanning) { getManager().stopScanBle();//from w ww . ja va 2 s .c om button.setText(R.string.heart_rate_setting_button_start); listView.removeFooterView(mFooterView); mIsScanning = false; } else { getManager().startScanBle(); button.setText(R.string.heart_rate_setting_button_stop); listView.addFooterView(mFooterView); mIsScanning = true; } }