Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jorge Martin Espinosa
    @Arasthel
    So I did it this way
    Not so clean or good for performance
    But a lot easier
    Yes, that could be a problem
    Also, you could want to do some stuff at activity's onCreate
    That's why I didn't really like this annotation
    You have onPostCreate, sure...
    Maybe @ContentView could just check if there is an onCreate method and add those 2 calls right after super.onCreate(...), but I don't think that will be of much help
    Mario Garcia
    @mariogarcia
    Actually that could be a good solution :thumbsup:
    Well sometimes you only have to create the OnCreate method just for adding the setCOntentView() that sometimes really piss me off :P
    I also have to ASTs for getting rid of the menu option initialization
    Jorge Martin Espinosa
    @Arasthel
    :+1:
    I also hate that one
    Mario Garcia
    @mariogarcia
    I'm creating a branch
    BTW I have noticed you are using android-spock. Did you check robospock ? I'm investigating now test options and I would like to know your opinion on this
    Jorge Martin Espinosa
    @Arasthel
    I wanted to use RoboSpock but it doesn't seem to be compatible with Groovy 2.4
    So instead I used @pieces029 's Android-Spock
    It's working fine so faer
    At least for testing SK
    I justed fixed a couple of bugs on @Parcelable this morning thanks to that
    Mario Garcia
    @mariogarcia
    Nice to hear that. Are you going to merge it with master any time soon ?
    Jorge Martin Espinosa
    @Arasthel
    As soon as I'm finished testing it, which could be from a couple of days to the infinite and more
    Android's Parcel could be one of the most untestable classes I've ever seen
    Mario Garcia
    @mariogarcia
    ok perfect
    Alex Isaienko
    @s0nerik
    @Arasthel RoboSpock actually works with Groovy 2.4, I'm using it in my fork of SwissKnife. It just have a dependency on Groovy 2.3.x that we can exclude.
    Jorge Martin Espinosa
    @Arasthel
    I see! Thanks for the info. I'll have to keep an eye on it and see which one fits me better Android-Spock or RoboSpock
    Alex Isaienko
    @s0nerik
    Well, as far as I remember, RoboSpock is suitable for unit testing and Android-Spock is only suitable for instrumentation testing. Instrumentation testing is slower, so RoboSpock should be a better choice.
    Ryan Vanderwerf
    @rvanderwerf
    hi there
    messing with Swissknife on a wear app, running into weird problems
    I tried just a basic use of the wear app in the swissknife to inject a view it it seems to be null
    I have another app that is working, but if I add 'SwissKnife.inject this' and no other use of SwissKnife annotations it crashes with this: Caused by: groovy.lang.MissingMethodException: No signature of method: com.tutosandroidfrance.wearsample.MainActivity.injectViews() is applicable for argument types: (com.tutosandroidfrance.wearsample.MainActivity) values: [com.tutosandroidfrance.wearsample.MainActivity@133ab8db]
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at com.arasthel.swissknife.SwissKnife.inject(SwissKnife.groovy:40)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at com.tutosandroidfrance.wearsample.MainActivity.onCreate(MainActivity.groovy:45)
    Eugene Kamenev
    @eugene-kamenev
    Arasthel/SwissKnife#37
    I will check this in an hour, just had a breakfast :)
    Ryan Vanderwerf
    @rvanderwerf
    heh thanks man. I'm new to SN so maybe I am just setting up something wrong, but I figured I'd start with a most basic case with the sample before I try anything fancy :)
    Eugene Kamenev
    @eugene-kamenev
    Maybe :) we didn't run wear app for a long time. So your app crashes on run, not on build as I see?
    Ryan Vanderwerf
    @rvanderwerf
    yes when I step through the debugger, as soon as I run the SwissKnife inject this it completely crashes with that exception. If I try to inject views, they are null as well (although not sure if inject must be called first). I'll post that project up on my git page later. I'm trying to demonstrate 'groovyifying' an regular wear app with SwissKnife and some other tools so show how much cleaner it will look :)
    that when I went back to the example in the project itself and just tried the basic stuff for a sanity check
    Eugene Kamenev
    @eugene-kamenev
    @rvanderwerf the most strange thing is that it cant find view even through default methods, you can try it yourself :) findViewById(R.id.text) gives null.
    Ryan Vanderwerf
    @rvanderwerf
    oh that is weird. Maybe it needs context to the watchstub first?
    Eugene Kamenev
    @eugene-kamenev
    check your issue please, more info there
    Ryan Vanderwerf
    @rvanderwerf
    cool thanks for checking it out. I didn't make that example in there, so I'm not sure either. I had trouble doing much with it so I was trying it on another app I knew more about.
    Eugene Kamenev
    @eugene-kamenev
    @rvanderwerf by the way you can simply find views by calling extension method view(int id) anywhere :)
    Ryan Vanderwerf
    @rvanderwerf
    nice
    I opened #38 with a real project. Would be cool if I could show off SN working in wear next week at gr8conf :) Going to sleep now 3am here :)
    Ryan Vanderwerf
    @rvanderwerf
    well I have some news on the bug. I took out the GridViewPager and DotsPageIndicator stuff, and SwissKnife works now. I have a branch I made to remote control a Lego EV3 robot and the injection and button even stuff works now. So I guess it seems to be a compatability thing with GridViewPager as far as I can tell.
    this is the branch I have where SK is now working https://github.com/rvanderwerf/WearDavinciEmmetGroovy/tree/EV3Wear
    Andrew Reitz
    @pieces029
    who's comming to gr8conf us!?
    Ryan Vanderwerf
    @rvanderwerf
    Me!
    Ryan Vanderwerf
    @rvanderwerf
    how about s2gx?
    Ryan Vanderwerf
    @rvanderwerf
    hey all, I see nobody has been on here lately anyone going to g3summit this month?