How do I finish an Activity from within a Presenter or a View in the mortar sample app?
How do I finish an Activity from within a mortar Presenter or a View?
804 Views Asked by Wu-Man At
1
There are 1 best solutions below
Related Questions in DAGGER
- Injecting login session using Dagger
- Singleton Dagger2 components
- The generated class for Component of Dagger 2 is not found in compileTestJava of Gradle's Java Plugin
- Injecting my module in Dagger gives me NPE
- Dagger 1 mocking modules in extended graph (example project included)
- Generate code for unit test build in Android Studio
- Dagger2 Component as Static Global Variable
- Dagger dependencies when overriding graph with mock module causes NoClassDefFoundError
- Using Dagger 2 to inject values when deserializing with Jackson
- Dagger won't generate Dagger classes for Android
- Dagger 2 : Unbounded dependency injection
- How can I avoid to set all my component's modules in an activity to inject dependencies with Dagger 2?
- Dagger 2 cannot be provided without an @Provides-annotated method
- Dagger2 Error: Module Must Be Set
- How to use dagger in a android library project
Related Questions in MORTAR
- What is the prefered way to save/restore screen state with Flow + Mortar + Dagger2?
- What was the reason to put view classes to layout instead of inflating layout inside view class?
- Writing Tests for Flow and Mortar Apps
- Android - How works MortarScope?
- Dagger error: Can't inject a non-static inner class
- How to insert existing fragment to Mortar architecture
- Android Flow example crashes with ClassNotFoundException
- Mortar and Flow libraries vs. ViewPager
- u2020+Mortar DrawerLayout and actionbar issue
- What does Square mean by 'offscreen fragments being brought back to life' and 'no direct control over animations'?
- Recommended way to get Activity inside Mortar screen?
- What is scope of class annotated with @Singleton in Mortar
- Using Flow & Mortar with ViewPager
- Mortar / Flow samples NoClassDefFoundError: com.example.mortar.MortarDemoApplication$1
- What is the proper way to imitate base class for Mortar views
Related Questions in SQUARE-FLOW
- What was the reason to put view classes to layout instead of inflating layout inside view class?
- Writing Tests for Flow and Mortar Apps
- How to switch layouts back and forth using Square's flow library?
- Android Flow example crashes with ClassNotFoundException
- Mortar and Flow libraries vs. ViewPager
- What does Square mean by 'offscreen fragments being brought back to life' and 'no direct control over animations'?
- Recommended way to get Activity inside Mortar screen?
- Using Flow & Mortar with ViewPager
- Mortar / Flow save view and presenter in backstack
- Square Flow + Mortar tablet examples
- How do I finish an Activity from within a mortar Presenter or a View?
- Mortar + Flow with third party libraries hooked to activity lifecycle
- Can Flow and Mortar load a screen in the background if it is slow to load (e.g. GoogleMap)?
- Proper way to use Dispatcher in Flow?
- Getting user input from a dialog using Mortar + Flow
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The majority of the time you would want to avoid doing this. But in dire circumstances you could follow the same pattern the ActionBarOwner[0] class implements. Create an injectable class that exposes Activity#finish via an interface.
Item 3 in [1] is related but the calling order is inverted. (Activity lifecycle methods to presenters instead of Presenters to Activity methods).
Hope that helps!
[0] https://github.com/square/mortar/blob/master/mortar-sample/src/main/java/com/example/mortar/android/ActionBarOwner.java
[1] Mortar + Flow with third party libraries hooked to activity lifecycle