Git Product home page Git Product logo

Comments (3)

senneco avatar senneco commented on August 16, 2024

Hi, @yaroslavyadrov. Currently, library doesn't have solution for this. I can suggest to you one solution. You can call method getMvpDelegate().onAttach() in onCreateOptionsMenu(Menu) method. Then commands will be applyed only when menu will be inflated. But then you shouldn't call getMvpDelegate().onAttach() in onStart() method. Then you can't use some BaseMvpActivity. But this looks right solution. Then all commands will be called in right order.

It's seems like a good place to change of BaseMvpActivity.

PS: it will not works on android less than v3.0.

from moxy.

yaroslavyadrov avatar yaroslavyadrov commented on August 16, 2024

Thank you, @senneco. I thought about this solution, but I decide to call Presenter method like setSavedMenuItemState() in OnCreateOptionsMenu and restore saved MenuItems state. Looks like dirty hack, but works.

from moxy.

senneco avatar senneco commented on August 16, 2024

Glad you found the solution =)

I would recommend a similar solution, but I wasn't sure that it will help you. For example, after you select menu item, a map will be added on the screen. And second command is "add pins to map". In this case, if view is in restore state, the "add pins" will not work because screen has not the map, yet.

from moxy.

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.