Detect textSize of TextViews both in start scene and end scene in custom transition

余生长醉 提交于 2019-12-24 07:59:49

问题


I'm writing a custom Transition for textSize of TextView as the shared element enter transition between two activities. I'm stuck with implementing the captureStartValues and captureEndValues. TransitionValues.view in these two methods is the same instance, which is just the TextView at start scene(if I add this transition in starting activity) or at end scene(if I add it in launching activity).

The accepted answer of this post uses SharedElementCallback(in his github demo) to set TextView's textSize which results in the TextSizeTransition to detect the correct textSize in start scene and end scene.

What I want to know is that, is it possible to detect the textSize of TextViews both in start scene and end scene just in custom TextSizeTransition without using SharedElementCallback?

Maybe like ChangeBounds, it captures start values and end values just using the target view from TransitionValues directly(it seems so from the source code).

Thanks.

来源:https://stackoverflow.com/questions/42041926/detect-textsize-of-textviews-both-in-start-scene-and-end-scene-in-custom-transit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!