We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感谢作者开源的框架。已经集成进项目中,不过我是对activity的某部分的viewgroup做了scene改造。 由于需要手动在activity中需要设置NavigationScene?引用比较丑。希望增加一个从父view逐级搜索到第一个scene就返回的方法.我参考的ViewUtility的方法写的代码
类似的代码
@Nullable public static Scene searchSceneFromView(@Nullable View view) { if (view != null) { Scene scene = (Scene) view.getTag(R.id.bytedance_scene_view_scene_tag); if (scene != null) return scene; if (view instanceof ViewGroup) { ViewGroup vg = (ViewGroup) view; for (int i = 0; i < vg.getChildCount(); i++) { View child = vg.getChildAt(i); scene = searchSceneFromView(child); if (scene != null) return scene; } } } return null; }
The text was updated successfully, but these errors were encountered:
你是想从View直接取到NavigationScene吗?ktx库有View.requireNavigationScene()/View.getNavigationScene
Sorry, something went wrong.
我这边可能是从R.id.content布局来找NavigationScene。需要向下查找。View.requireNavigationScene()/View.getNavigationScene 只能向上查找。 我本地写成扩展方法了
No branches or pull requests
感谢作者开源的框架。已经集成进项目中,不过我是对activity的某部分的viewgroup做了scene改造。
由于需要手动在activity中需要设置NavigationScene?引用比较丑。希望增加一个从父view逐级搜索到第一个scene就返回的方法.我参考的ViewUtility的方法写的代码
类似的代码
The text was updated successfully, but these errors were encountered: