Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 14 17:55
    WeaponMan commented #2306
  • Oct 14 17:54
    WeaponMan commented #2306
  • Sep 26 15:41
    krischik commented #2306
  • Sep 23 10:48
    peterplamenovpenchev commented #2306
  • Sep 15 09:17
    WonderCsabo commented #2306
  • Sep 15 08:31
    dodgex commented #2306
  • Sep 14 18:18
    krischik commented #2306
  • Sep 09 06:32
    vikalppatelce edited #2306
  • Sep 09 06:18
    vikalppatelce opened #2306
  • Aug 30 06:38
    YunLemon reopened #2304
  • Aug 16 02:37
    YunLemon opened #2304
  • Jul 14 09:13
    vxhviet commented #2303
  • Jul 14 08:25
    vxhviet commented #2303
  • Jun 07 12:28
    zizibuba commented #2303
  • May 21 07:48
    DenisFedak84 edited #2303
  • May 21 07:47
    DenisFedak84 edited #2303
  • May 21 07:46
    DenisFedak84 edited #2303
  • May 21 07:43
    DenisFedak84 opened #2303
  • Apr 10 17:46
    WonderCsabo commented #2297
  • Apr 10 17:45
    WonderCsabo commented #2299
Kay-Uwe Janssen
@dodgex
not without a 5.0 release an breaking changes
Adrián Rivero
@smaugho
yes, I understand.. cause' apps out there could start crashing :)
Kay-Uwe Janssen
@dodgex
yes
Adrián Rivero
@smaugho
ok.. I think I will try to figure out why Android really requires that this ViewModelProviders creates the ViewModel after the onCreate, I'm not sure if there is some reason for it.. Ok ok, I'll see if I could find some solution to that in a different way.. Maybe providing a custom factory could be solved
Kay-Uwe Janssen
@dodgex
I'd love to do a full rewrite of AA and how it does some of it's stuff. but to be honest it is way to much work. especially considering that i'm currently not doing any android dev and even my company where we (our 1-man mobile team) used to use AA is no longer using it as we are shifting to react native to support ios
Adrián Rivero
@smaugho
I understand.. BTW, I saw you interested in Lombok, or well, at least saw you letting some comments there :)
Kay-Uwe Janssen
@dodgex
yeah
used in some projects in the past (including my old android app^^)
but only private projects
Adrián Rivero
@smaugho
Using similar "techniques", AA could change a lot in fact.... But not sure of how much work it really will take
Kay-Uwe Janssen
@dodgex
i'd not use such technologies
i'd check the transform apis google provides for android builds
Adrián Rivero
@smaugho
mmm.. have to check that
Kay-Uwe Janssen
@dodgex
but i think it also is pretty complex
i recently tried to read up on kotlin compiler plugins. but that shit is pretty complex with working partly on byte code level for added/generated code
Adrián Rivero
@smaugho
:)
Kay-Uwe Janssen
@dodgex
and its damn hard to find (recent) docs or samples
Adrián Rivero
@smaugho
BTW, I mentioned something above that I could try to do on my company.. I have several devs under my management.. I've seriously been thinking in start instructing one to let him contributing to AA, plugins or whatever is need it.. we need it in our company anyway.
I already started once, but he was too stressed with this "type of programming" :sweat_smile: ... Well, I think I'll give it another shot in near future..
Kay-Uwe Janssen
@dodgex
yeah
that annotation processing and code generation stuff is not that easy :D
i think just compiler stuff (like GWT) is more complex :D
okay, there might be much more in between. ;)
Adrián Rivero
@smaugho
Yeap.. well, I've get till "Java Tree" level, not deeper
but you can do pretty cool thing with the Java Trees API
Kay-Uwe Janssen
@dodgex
Tree api?
you mean stuff like TreeSet?
Adrián Rivero
@smaugho
No no, Trees API, you applies a Scanner over an Element, and you can get all the code under a method for instance
And do stuff there
Kay-Uwe Janssen
@dodgex
ah okay
Adrián Rivero
@smaugho
Compiler Tree API I think. In fact, it can solve issues in AA :), like being able to inject the classes like it is in the code, since you can get all the Imports
that is tricky in the current implementation
Kay-Uwe Janssen
@dodgex
yeha
Adrián Rivero
@smaugho
but it would make AA dependent on that API, which I'm not sure is that good
Kay-Uwe Janssen
@dodgex
i assume it is not good :D
it is com.sun so it should be avoided if possible :D
Adrián Rivero
@smaugho
 protected void onCreate(@Nullable Bundle savedInstanceState) {
        mFragments.attachHost(null /*parent*/);

        super.onCreate(savedInstanceState);

        NonConfigurationInstances nc =
                (NonConfigurationInstances) getLastNonConfigurationInstance();
        if (nc != null) {
            mViewModelStore = nc.viewModelStore;   //HERE IS THE ISSUE
        }
I found in Android code why the ViewModelProvider should be called after the super.onCreate the mViewModelStore is the issue

it is com.sun so it should be avoided if possible :D

Yeap

Kay-Uwe Janssen
@dodgex
this is androidx/support-lib Activity?
Adrián Rivero
@smaugho
no, it is the normal support one, not AndroidX
Kay-Uwe Janssen
@dodgex
well recent support lib should be the same as androidx
just diffrent package
afaik <-
Adrián Rivero
@smaugho
Well, I think there is a solution to that :).. I should basically override an instance called ViewModelStoreOwner
probably on @EActivity and @EFragment...
this one should return the onCreate after super.onCreate()
so you could do your view model injection at that point