Last active
February 19, 2017 08:13
-
-
Save nontravis/520b2f3989f139f814a433c035e522d9 to your computer and use it in GitHub Desktop.
Example_MainPresenter_for_test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainPresenter{ | |
public int calculate(int value){ | |
// some logic | |
... | |
} | |
public void clickGotoSecondActivity(){ | |
// some logic | |
... | |
RxBus.post(new GoToSecondEvent()); | |
} | |
public void requestService(){ | |
// some logic | |
... | |
manager.requestSomeSerice(); | |
} | |
@Subscribe | |
public void onReceiveSuccessEvent(SuccessEvent event){ | |
// some logic | |
... | |
getView().hideLoading(); | |
} | |
@Subscribe | |
public void onReceiveFailEvent(FailEvent event){ | |
// some logic | |
... | |
getView().hideLoading(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment