@Override public void notifyDataSetChanged() { filterTasks(); super.notifyDataSetChanged(); }
@Override public void notifyDataSetChanged() { this.mChildLayouts = generateChildLayouts(); super.notifyDataSetChanged(); }
private void checkCleanFinish() { if (mIsProcessCleanFinish && mIsSysCacheCleanFinish && mIsOverallCleanFinish) { mHeaderView.mProgress.setText("清理完成"); mHeaderView.mSize.setText(CleanUtil.formatShortFileSize(this, 0L)); for (JunkGroup group : mJunkGroups.values()) { group.mSize = 0L; group.mChildren = null; } mAdapter.notifyDataSetChanged(); } }
@Override public void onOperationCompleted(final BluetoothDevice device) { setOperationInProgress(false); runOnUiThread(() -> { final SparseArray<GlucoseRecord> records = mGlucoseManager.getRecords(); if (records.size() > 0) { final int unit = records.valueAt(0).unit; mUnitView.setVisibility(View.VISIBLE); mUnitView.setText(unit == GlucoseRecord.UNIT_kgpl ? R.string.gls_unit_mgpdl : R.string.gls_unit_mmolpl); } else { mUnitView.setVisibility(View.GONE); } mAdapter.notifyDataSetChanged(); }); }
@Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case UPDATE_LIST: if (mContentViewPage.getCurrentItem() == 0) { ((BaseExpandableListAdapter) adapter).notifyDataSetChanged(); } else { mDownloadedAdapter.notifyDataChange(); } break; case SHOW_MSG: Toast.makeText(MyApplication.applicationContext, (String) msg.obj, Toast.LENGTH_SHORT).show(); break; case DISMISS_INIT_DIALOG: initDialog.dismiss(); handler.sendEmptyMessage(UPDATE_LIST); break; case SHOW_INIT_DIALOG: if (initDialog != null) { initDialog.show(); } break; default: break; } }
private void checkScanFinish() { mAdapter.notifyDataSetChanged(); if (mIsProcessScanFinish && mIsSysCacheScanFinish && mIsOverallScanFinish) { mIsScanning = false; JunkGroup cacheGroup = mJunkGroups.get(JunkGroup.GROUP_CACHE); ArrayList<JunkInfo> children = cacheGroup.mChildren; cacheGroup.mChildren = new ArrayList<>(); for (JunkInfo info : children) { cacheGroup.mChildren.add(info); if (info.mChildren != null) { cacheGroup.mChildren.addAll(info.mChildren); } } children = null; long size = getTotalSize(); String totalSize = CleanUtil.formatShortFileSize(this, size); mHeaderView.mSize.setText(totalSize); mHeaderView.mProgress.setText("共发现:" + totalSize); mHeaderView.mProgress.setGravity(Gravity.CENTER); mCleanButton.setEnabled(true); } }
@Override public void notifyDataSetChanged() { mRecords = mGlucoseManager.getRecords().clone(); super.notifyDataSetChanged(); }
/** * 离线地图下载回调方法 */ @Override public void onDownload(int status, int completeCode, String downName) { //只有与服务绑定了才更新Activity的进度 if (isServiceBound && mBinder != null) { groupPosition = mBinder.groupPosition; childPosition = mBinder.childPosition; if (groupPosition == 0 || groupPosition == 1 || groupPosition == 2) { cityMap.get(groupPosition).get(childPosition).setState(status); } else { if (childPosition == 0) { for (int i = 0; i < cityMap.get(groupPosition).size(); i++) { cityMap.get(groupPosition).get(i).setState(status);// } } else { cityMap.get(groupPosition).get(childPosition).setState(status); } } this.completeCode = completeCode; ((BaseExpandableListAdapter) adapter).notifyDataSetChanged(); } }
@Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { JunkInfo info = (JunkInfo) mAdapter.getChild(groupPosition, childPosition); if (groupPosition == JunkGroup.GROUP_APK || info.mIsChild || (groupPosition == JunkGroup.GROUP_ADV && !info.mIsChild && info.mPath != null)) { if (info.mPath != null) { Toast.makeText(JunkCleanActivity.this, info.mPath, Toast.LENGTH_SHORT).show(); } } else { int childrenInThisGroup = mAdapter.getChildrenCount(groupPosition); for (int i = childPosition + 1; i < childrenInThisGroup; i++) { JunkInfo child = (JunkInfo) mAdapter.getChild(groupPosition, i); if (!child.mIsChild) { break; } child.mIsVisible = !child.mIsVisible; } mAdapter.notifyDataSetChanged(); } return false; } });
@Override public void notifyDataSetChanged() { mGroups.clear(); List<CurrentlyOpenTab> tabList = mRecentTabsManager.getCurrentlyOpenTabs(); if (tabList != null && !tabList.isEmpty()) { addGroup(new CurrentlyOpenTabsGroup(tabList)); } addGroup(mRecentlyClosedTabsGroup); for (ForeignSession session : mRecentTabsManager.getForeignSessions()) { if (!mHasForeignDataRecorded) { RecordHistogram.recordEnumeratedHistogram("HistoryPage.OtherDevicesMenu", OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.LIMIT); mHasForeignDataRecorded = true; } addGroup(new ForeignSessionGroup(session)); } if (mRecentTabsManager.shouldDisplaySyncPromo()) { addGroup(new SyncPromoGroup()); } // Add separator line after the recently closed tabs group. int recentlyClosedIndex = mGroups.indexOf(mRecentlyClosedTabsGroup); if (DeviceFormFactor.isTablet(mActivity)) { if (recentlyClosedIndex != mGroups.size() - 2) { mGroups.set(recentlyClosedIndex + 1, mVisibleSeparatorGroup); } } else if (recentlyClosedIndex != mGroups.size() - 1) { mGroups.add(recentlyClosedIndex + 1, mVisibleSeparatorGroup); } super.notifyDataSetChanged(); }