Code Monkey home page Code Monkey logo

autogo's People

Contributors

tellh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autogo's Issues

How about adding a goForResult Method?

How about adding a new method to the interface AutoLauncher like this:
public interface AutoLauncher {
void go();
void goForResult(int requestCode);
}
generated implementation:
public class xxx implements AutoLauncher{
// method as usual
// then
@OverRide
public void goForResult(int requestCode) {
srcActivity.startActivityForResult(intent, requestCode);
intent = null;
srcActivity = null;
}
}
Usage:
AutoGo.from(xxx).xxx.goForResult(requestCode);
For the case of startActivityForResult(Intent intent, int requestCode) ?

"your target activity haven't been started." when activity not started from AutoGo

Hello @TellH , would you please check the below issue? Thanks very much.
When the activity is not started from AutoGo.from(xxx).gotoXXX().xxx.go();, there might be problems in the target activity's AutoGo.assign(this), as the autoAssigner may not be initialized yet.

  1. If the project is huge, it would take a lot of time to check every startActivity entry, any one entry left without using AutoGo....go() might get into trouble.
  2. If the activity is started outside, like from a push event, then there is no way to initialize the autoAssigner, it definitely will cause problems.
    So, it would be better to init the autoAssigner in the AutoGo.assign(this) method rather than AutoGo.gotoXXX(), one way of doing this is in the method AutoGo.getAssigner(Activity):

AutoAssigner autoAssigner = autoAssignerMap.get(className);
if(autoAssigner == null) {
autoAssigner = (AutoAssigner) Class.forName(className + "_AutoAssigner").newInstance();
autoAssignerMap.put(className, autoAssigner);
}

the second way of doing this is for users who are using the AutoGo lib:
when you call AutoGo.assign(this);
call AutoGo.from(this).gotoSelfActivityName(); before it.

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.