Coder Social home page Coder Social logo

Comments (6)

simplehych avatar simplehych commented on May 1, 2024

@mzule 同问
调用的方式和之前一样,但是,
问题 1. 怎么传入Bundle?
问题 2. 对于有返回值的方法怎么接收 有什么好的建议吗?

另: 调用静态方法 logout()uploadLog() 吐司没有响应
需要将布局文件中的 mzule 修改为 router

        <TextView
            style="@style/Menu"
            android:text="  mzule   ://upload" />
        <TextView
            style="@style/Menu"
            android:text="  mzule   ://logout" />

=>

        <TextView
            style="@style/Menu"
            android:text="  router  ://upload" />

        <TextView
            style="@style/Menu"
            android:text="  router  ://logout" />

from activityrouter.

qq634421026 avatar qq634421026 commented on May 1, 2024

@simplehych 对的 需要把mzule改成router 因为在清单文件里RouterActivity的scheme是router

from activityrouter.

mzule avatar mzule commented on May 1, 2024

谢谢,之前 scheme 写错了,现已被 @simplehych 修复~

from activityrouter.

simplehych avatar simplehych commented on May 1, 2024

请问调用静态方法怎么使用,能传值吗?静态方法写成有返回值的该如何接收吗? 代码里好像没有做这方面的处理,只是invoke了该方法,请问 传值进入返回接收 怎么实现,谢谢 @mzule

from activityrouter.

mzule avatar mzule commented on May 1, 2024

@simplehych 传值通过 scheme 拼接实现,如 router://logout?name=value,然后再在 bundle 里面取值; 返回值不支持。

from activityrouter.

simplehych avatar simplehych commented on May 1, 2024

@mzule 好的,谢谢

from activityrouter.

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.