示例#1
0
  public void saveActionViewStates(Bundle outStates) {
    SparseArray<Parcelable> viewStates = null;

    final int itemCount = size();
    for (int i = 0; i < itemCount; i++) {
      final MenuItem item = getItem(i);
      final View v = item.getActionView();
      if (v != null && v.getId() != View.NO_ID) {
        if (viewStates == null) {
          viewStates = new SparseArray<Parcelable>();
        }
        v.saveHierarchyState(viewStates);
        if (item.isActionViewExpanded()) {
          outStates.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
        }
      }
      if (item.hasSubMenu()) {
        final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
        // subMenu.saveActionViewStates(outStates);
      }
    }

    if (viewStates != null) {
      outStates.putSparseParcelableArray(getActionViewStatesKey(), viewStates);
    }
  }
 @Override
 public void onLoadFinished(Loader<List<OrgInfoModel>> loader, List<OrgInfoModel> data) {
   mProgressDialog.dismiss();
   mData = data;
   mAdapter.setData(mData);
   mSwipeLayout.setRefreshing(false);
   if (searchItem.isActionViewExpanded()) {
     searchItem.collapseActionView();
   }
   Log.d(Constants.TAG, "MainActivity onLoadFinished");
 }
示例#3
0
 @Override
 public boolean isActionViewExpanded() {
   return mNativeItem.isActionViewExpanded();
 }
 public boolean isFilterExpanded() {
   return miFilter != null && miFilter.isActionViewExpanded();
 }