• r

    Rahul Ch

    2 years ago
    Hi guys, I want to create a modular android app. The interaction to each module should be from the main App. For example If the Login module is called and once its job is done it should send back response to main app and main app should decide which module to be called... What is best architecture that I should follow to achieve this? Something like Uber Ribs.
    r
    u
    4 replies
    Copy to Clipboard
  • u

    ursus

    2 years ago
    should viewmodel calculate this and emit a enum, or should it just provide the "raw" values from which view calculates it?
    u
    r
    +1
    7 replies
    Copy to Clipboard
  • b

    BMG

    2 years ago
    In Android presenter code, I see something like this, where
    isFetching
    is a class variable which holds network data fetching state. Is this a good pattern? I was trying to remove this class variable to reduce state in presenter. Is that possible or will it be an overkill?
    override fun fetchData() : {
      if(isFetching) return
    
      isFetching = true
      apiService
           .fetchData()
           .doOnFinally { isFetching = false }
           .subscribe({ 
              view?.updateData()
            }, { })
    }
    b
    KayCee
    4 replies
    Copy to Clipboard
  • s

    Steve

    2 years ago
    Using the NavigationComponent with a drawer, is there a way to programmatically show or hide some destinations? I have a module that should be in the Navigation Drawer, but not for everyone; only those users who have paid for the feature.
    s
    emmax
    2 replies
    Copy to Clipboard
  • s

    Slackbot

    2 years ago
    This message was deleted.
    s
    1 replies
    Copy to Clipboard
  • Joan Colmenero

    Joan Colmenero

    2 years ago
    Hello guys, I'm planning to create an endless scroll-view and I've found this Paging library from the Jetpack, looks very interesting but I do not get one thing, I'm used to from the repository do the mapper to the domain object, so from the use-case/inter-actor I have the domain object already done because I map it on the repository layer, my question is, dis data source that I have to create and this
    PageKeyedDataSource
    where is the correct layer to use it? Because I have to pass an object and don't know if it's the domain object or the response from retrofit.
    Joan Colmenero
    Dustin Lam
    3 replies
    Copy to Clipboard
  • oday

    oday

    2 years ago
    hi, I have this code in my LoginViewModel https://hastebin.com/ujihufovil.kt and this code in my SignUpViewModel https://hastebin.com/uqilarefif.kt the functionality is duplicated and I’m not sure how to go about making them reusable and minimize the code as much as possible, I do know that validating the pattern checking for empty string and reacting to the results by setting the error message is doing too many things at once and that they should be separated but when I think of separating them I think then of having the same validateEmail (vaildatePassword) methods contain the new functions but still doing the 3 things at once, but now using functions ..how do I make this easier and not so jumbled?
    oday
    s
    10 replies
    Copy to Clipboard
  • s

    streetsofboston

    2 years ago
    There is this love/hate relationship with DataBinding with us and hate seems to be winning out.... We started a project with just Coroutines and Flows. So far, so good. 😀
    s
    s
    +1
    11 replies
    Copy to Clipboard
  • jurajsolarml

    jurajsolarml

    2 years ago
    Hello, please help. I was beginner. What is wrong ? Android Studio 3.6.3,Kotlin 1.3.7.2, I've tried Refactor-Migrate-it Androidx, Clean Project, Rebuild Project, InvalidateCache / Restart multiple times it didn't help.https://pastebin.com/byj01tJe https://pastebin.com/bpVPuj72 https://pastebin.com/da2LePiK Error here:https://pastebin.com/uNi5EXFT https://pastebin.com/55x0xiFA Thanks
    jurajsolarml
    k
    2 replies
    Copy to Clipboard
  • Orhan Tozan

    Orhan Tozan

    2 years ago
    When using Koin/Dagger, is it usual to instantiate a repository on login and delete it on logout? Or maintain a single repository during the app's lifecycle, and clear it's cache when logging out?
    Orhan Tozan
    s
    3 replies
    Copy to Clipboard