Code Monkey home page Code Monkey logo

Comments (2)

sansecy avatar sansecy commented on May 29, 2024 2

插件Activity会经历transform
白名单区分了class使用宿主还是插件,
配置白名单意味着,使用宿主的androidx.fragment,那么插件activity被拉起时会出现
xxxFragmentActivity cannot be cast to "com.tencent.shadow.core.runtime2.ShadowActivity", fragment被添加进宿主中可能会遇到资源访问的问题。
不配置白名单,宿主使用插件fragment会出现androidx.fragment.app.Fragment cannot be cast to "androidx.fragment.app.Fragment"
本质上shadow在设计上就是为了资源隔离,所以用法上是以Activity为基准
如果要按照需求设计,那么应该是在宿主创建一个fragment来适应宿主的环境,然后让插件的功能来创建view,再把view放进宿主的fragment里

from shadow.

budaowengd avatar budaowengd commented on May 29, 2024

明白了,谢谢兄弟指教

from shadow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.