/**
* Inflates a desired Transition from the specified <var>resource</var>.
*
* @param context Context used for inflation process.
* @param resource Resource id of the desired transition to inflate.
* @return Inflated transition or {@code null} if the current API level does not support transitions.
* @see TransitionInflater#inflateTransition(int)
* @see #inflateTransitionManager(Context, int, ViewGroup)
*/
@Nullable
@SuppressLint("NewApi")
public static Transition inflateTransition(@NonNull final Context context, @TransitionRes final int resource) {
return FragmentPolicies.TRANSITIONS_SUPPORTED ? TransitionInflater.from(context).inflateTransition(resource) : null;
}
FragmentUtils.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:android_fragments
作者:
评论列表
文章目录