androidx.fragment.app.Fragment.equals()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中androidx.fragment.app.Fragment.equals()方法的一些代码示例,展示了Fragment.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.equals()方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称:Fragment
方法名:equals

Fragment.equals介绍

暂无

代码示例

代码示例来源:origin: jruesga/rview

@Override
@SuppressWarnings("unchecked")
public <T> void onRefreshEnd(Fragment from, T result) {
  super.onRefreshEnd(from, result);
  if (result == null) {
    return;
  }
  if (mIsTwoPane && result instanceof List) {
    Fragment current = getSupportFragmentManager().findFragmentByTag(
        FRAGMENT_TAG_LIST);
    if (current instanceof PageableFragment) {
      current = ((PageableFragment) current).getCurrentFragment();
      if (current != null && !current.equals(from)) {
        // This is not the visible fragment. ignore its results
        return;
      }
    } else {
      if (!current.equals(from)) {
        // This is not the visible fragment. ignore its results
        return;
      }
    }
    List<ChangeInfo> changes = (List<ChangeInfo>) result;
    if (!changes.isEmpty() && mModel.selectedChangeId == INVALID_ITEM) {
      onChangeItemPressed(changes.get(0));
    }
  } else if (result instanceof ChangeInfo) {
    mModel.selectedChangeId = ((ChangeInfo) result).legacyChangeId;
  }
}

代码示例来源:origin: jruesga/rview

@Override
@SuppressWarnings("unchecked")
public <T> void onRefreshEnd(Fragment from, T result) {
  super.onRefreshEnd(from, result);
  if (result == null) {
    return;
  }
  if (mIsTwoPane && result instanceof List) {
    Fragment current = getSupportFragmentManager().findFragmentByTag(
        FRAGMENT_TAG_LIST);
    if (current instanceof PageableFragment) {
      current = ((PageableFragment) current).getCurrentFragment();
      if (current == null || !current.equals(from)) {
        // This is not the visible fragment. ignore its results
        return;
      }
    } else {
      if (!current.equals(from)) {
        // This is not the visible fragment. ignore its results
        return;
      }
    }
    List<ChangeInfo> changes = (List<ChangeInfo>) result;
    if (!changes.isEmpty() && mSelectedChangeId == INVALID_ITEM) {
      onChangeItemPressed(changes.get(0));
    }
  } else if (result instanceof ChangeInfo) {
    mSelectedChangeId = ((ChangeInfo) result).legacyChangeId;
  }
}

代码示例来源:origin: luhaoaimama1/zone-sdk

if(manager.getFragments()!=null){
  for (Fragment item : manager.getFragments()) {
    if (item!=null&&item.equals(entity.fragment)) {
if(manager.getFragments()!=null){
  for (Fragment item : manager.getFragments()) {
    if (item!=null&&item.equals(entity.fragment)) {
      tran.show(entity.fragment);
      nowFragmentEntity=entity;

相关文章