SwipeBackActivity下这段:
@Override
public View findViewById(int id) {
View v = super.findViewById(id);
if (v == null && mHelper != null)
return mHelper.findViewById(id);
return v;
}
返回的View,可以兼容sdk27,参考27的fbc做法:
@SuppressWarnings("TypeParameterUnusedInFormals")
@Override
public <T extends View> T findViewById(@IdRes int id) {
return getDelegate().findViewById(id);
}
SwipeBackActivity下这段: @Override public View findViewById(int id) { View v = super.findViewById(id); if (v == null && mHelper != null) return mHelper.findViewById(id); return v; } 返回的View,可以兼容sdk27,参考27的fbc做法:
。 这个部分27版本Activity中,findViewById没有带强转的时候,使用其右滑框架,不用再做繁琐的处理强转View的问题。