• Diego

    Diego

    10 months ago
    Hi guys. I'm working on a trading app. I need to list the user stocks and their value (profit or loss) among with the total value of the portfolio. For the holdings list, in an MVP architecture I would create a presenter for each list item but for this app I decided to use MVVM (Compose, ViewModels and Hilt ). My first idea was to create a different ViewModel for each list item. When using MVVM architecture, is what I'm trying to do the correct way or I should use a single ViewModel? Are you aware about any project I could have a look at? The image below is a super simplification of my actual screen, each cell complex and that's why I wanted to use a different ViewModel for each cell. Any suggestion is very welcome.
    Diego
    u
    3 replies
    Copy to Clipboard
  • s

    Sergio C.

    10 months ago
    Hello everyone, is there a way to make paging display always a fixed number of items? I have a Realtime database which can reach thousands of items so it's not good idea to keep loading items to memory and make the app slow. Also I need to search/filter items by phone number in the entire list from the Realtime database. Is there something like this already done? How could I do this? I'm thinking of using Room to store all the items from DB so I can search easily. Now the part of keeping a fixed number of elements in the pager I don't have an idea.
    s
    Javier
    +2
    9 replies
    Copy to Clipboard
  • u

    ursus

    10 months ago
    people who use anvil or hilt for di how do you deal with object composition? how to "uninclude" the default implementation from base type binding, but then have it available as parameter for the extended type?
    u
    marlonlom
    2 replies
    Copy to Clipboard
  • Hakob Astvacatryan

    Hakob Astvacatryan

    10 months ago
    Hey folks, we are investigating Anvil as a DI solution. How do you make injection easer for Activities or Fragments?
    Hakob Astvacatryan
    m
    4 replies
    Copy to Clipboard
  • vesp

    vesp

    10 months ago
    Maybe this is my natually skeptical nature but is Google's iosched repo the absolute best repo to turn to for Android archictecture best practices? Is there another repo that has...even better best practices?
    vesp
    marlonlom
    +3
    11 replies
    Copy to Clipboard
  • l

    Lilly

    10 months ago
    From a gradle point of view my project structure looks like: Project A (android app) -> Project B (android library) <- Project C (android library) So instead of having a multi module project I have a bunch of standalone projects that are published separately. I ran into some problems and was overthinking this approach and I don't know why I went this path in the past (I guess I didn't know how to publish modules in a mm project). Since we can publish modules in a multi module project (so they can be shared with other projects) wouldn't it be better to got with a multi module project. I can't see any benefit with having a lot of single projects. Are there any advantages disadvantages between these approaches?
    l
    Javier
    +1
    4 replies
    Copy to Clipboard
  • a

    Alex C

    10 months ago
    Hey folks, using jetpack Navigation, I can add enterAnim and exitAnim in the navigation action, but how can I add animation when using navigationUp()?
    a
    Gabriel Guedes
    2 replies
    Copy to Clipboard
  • m

    mattinger

    10 months ago
    For anyone using hilt, our app has a really big graph at the moment (a ton of modules). We’re considering using hilt in our libraries first, and would need to get objects from our existing component into the SingletonComponent. I tried creating a bridge module which would pull from our singleton components’ holder to get the objects. However, it seems when i switch from the dagger to the hilt compiler, it’s not generating my existing components. If i have both, i get an error that it can’t find some MemoizedSential internal class. Has anyone even tried this before?
    m
    k
    +1
    5 replies
    Copy to Clipboard
  • u

    ursus

    10 months ago
    Do you guys drop database columns? Its extra annoying to do the temp table nonsense
    u
    bezrukov
    +1
    7 replies
    Copy to Clipboard
  • u

    ursus

    9 months ago
    Has anyone worked on some purchase flow? Any smarts on how to handle branching etc? Unless your fragment 1 just replaces it self with fragment 2 etc
    u
    1 replies
    Copy to Clipboard