• u

    ursus

    3 years ago
    Guys, does it make sense to have 2 of the same vector drawable, with only different size? Do I get some perf benefit? Why do they even have size if its vector? Shouldnt I only chose image view size?
    u
    gildor
    2 replies
    Copy to Clipboard
  • r

    Rok Koncina

    3 years ago
    Custom view and MVP So, I have a slightly complex custom view for adding and removing items: + and - buttons and "add" button when you have 0 items selected. There are disabled states if you can't get over or below some value. The view is heavily reused, mostly (but not exclusively) inside recycler views, on different elements, multiple screens. So now the question - how to structure the code in the MVP pattern? Does this custom view get it's own presenter? If yes, how does it connect to the main presenter (and how to handle recycling in this case)? Else, do I have to repeat the logic in each presenter for each screen or inject some kind of controller and pass it through the adapter to items (in which case, what's the difference with individual presenters)?
    r
    Cody Engel
    6 replies
    Copy to Clipboard
  • u

    ursus

    3 years ago
    + This presumes SELECT * projections..How about partial projections? Would you rather have scoped object of only user name and imagr url? Or full User object with name and url filled and rest of fields null?
    u
    g
    +1
    287 replies
    Copy to Clipboard
  • u

    ursus

    3 years ago
    or should I maybe insert the search messages into db with some flag isFromSearch=true?
    u
    1 replies
    Copy to Clipboard
  • a

    alexsullivan114

    3 years ago
    Has anyone who's used the navigation library figured out a way to get a reference to a newly added fragment? I'm trying to use the google places API and they provide a fragment of their own. That fragment needs a few values set on it so I'm trying to figure out how to do that.
    a
    s
    4 replies
    Copy to Clipboard
  • u

    ursus

    3 years ago
    When in MVI what would you do a thing that has no diff? Like lets say some list of dynamically added buttons in a horizontal scroll view and you want to select one (and show border around it for example) by mvi it should be a click routed to viewmodel or wherever, where it copy mutates the state and emits a new tuple of list + selected index for example but now what, what about the list? only the index basically changed. Do you teardown the whole buttons list and recreate?
    u
    b
    5 replies
    Copy to Clipboard
  • u

    ursus

    3 years ago
    I have 32 view types in recycler view. I think its too much. But most of them are variations of the same (like item A with and without header, or item A with big margin left to visualize nesting). Maybe it makes sense to have that be the same view type and visible/gone the header in on bindview? Is there some perf penalty to this? In my head it causes layout, but so does setting text on wrap_content height textview. What would be the heuristic to create a new viewtype if views are like that? (variations of the same?)
    u
    m
    +1
    9 replies
    Copy to Clipboard
  • d

    dewildte

    3 years ago
    Where would be a good place to start preparing our current applications to migrate over to the new Jetpack Compose code? Could we start wrapping views in a construct that works similar to how it works already?
    d
    s
    +2
    4 replies
    Copy to Clipboard
  • u

    ursus

    3 years ago
    Paginating the changes is probably stupid since you need it all
    u
    s
    3 replies
    Copy to Clipboard
  • s

    scottiedog45

    3 years ago
    is there a disadvantage (or is it an antipattern to) have a viewmodel for each fragment? My app architecture is one activity that switches out fragments as screens.
    s
    d
    2 replies
    Copy to Clipboard