本文整理了Java中androidx.fragment.app.Fragment.equals()
方法的一些代码示例,展示了Fragment.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.equals()
方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称: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;
内容来源于网络,如有侵权,请联系作者删除!