本文整理了Java中android.transition.Transition.setEpicenterCallback()
方法的一些代码示例,展示了Transition.setEpicenterCallback()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transition.setEpicenterCallback()
方法的具体详情如下:
包路径:android.transition.Transition
类名称:Transition
方法名:setEpicenterCallback
暂无
代码示例来源:origin: bluelinelabs/Conductor
public static void setEpicenter(@NonNull Transition transition, @Nullable View view) {
if (view != null) {
final Rect epicenter = new Rect();
getBoundsOnScreen(view, epicenter);
transition.setEpicenterCallback(new Transition.EpicenterCallback() {
@Override
public Rect onGetEpicenter(Transition transition) {
return epicenter;
}
});
}
}
代码示例来源:origin: bluelinelabs/Conductor
setFromEpicenter(capturedFromSharedElements);
if (enterTransition != null) {
enterTransition.setEpicenterCallback(new Transition.EpicenterCallback() {
@Override
public Rect onGetEpicenter(Transition transition) {
代码示例来源:origin: kingargyle/adt-leanback-support
private static void setSharedElementEpicenter(Transition transition,
final EpicenterView epicenterView) {
if (transition != null) {
transition.setEpicenterCallback(new Transition.EpicenterCallback() {
private Rect mEpicenter;
@Override
public Rect onGetEpicenter(Transition transition) {
if (mEpicenter == null && epicenterView.epicenter != null) {
mEpicenter = getBoundsOnScreen(epicenterView.epicenter);
}
return mEpicenter;
}
});
}
}
代码示例来源:origin: kingargyle/adt-leanback-support
public static void setEpicenter(Object transitionObject, View view) {
Transition transition = (Transition) transitionObject;
final Rect epicenter = getBoundsOnScreen(view);
transition.setEpicenterCallback(new Transition.EpicenterCallback() {
@Override
public Rect onGetEpicenter(Transition transition) {
return epicenter;
}
});
}
内容来源于网络,如有侵权,请联系作者删除!