Android framework provides no support for creating a TextView that can fit its content to its size. There are some libraries out there that try to solve this problem, like: AutoFitTextView android-autofittextview But no one of them seems to work in every situation. Looking into stackoverflow I’ve come to this post which ... Read more 09 Sep 2016 - less than 1 minute read
Oggi si è tenuto al FabLab di Padova un Workshop sull’Internet of Things, durante il quale ho avuto il piacere di anticipare l’intervento di Intel con un intervento dal titolo #Google, #Android, #IoT. Durante questo intervento ho fornito agli attendenti una panoramica sui servizi che Google mette a disposizione per l’universo dell’Int... Read more 18 Jun 2016 - less than 1 minute read
When you run your Android tests (like espresso tests), you may want to be able to force the locale of your device to some specific value at runtime (during test execution). This could be really helpful if you want to test some features of your app against multiple locales. You can do this by using Junit4 rules. The rule implementation looks lik... Read more 09 May 2016 - 1 minute read
Sometimes some fetaures of your app must behave differently for different flavors o build type. Think about when you need to enable logging for a specific flavor only, or you have to disable crash reporting for your “dev build”. All this behaviours can be configured at compile time, insted of using many if/else blocks that are evaluated at runti... Read more 28 Jan 2016 - 3 minute read
Have you ever got a OutOfMemoryError while compiling an Android project, just like this? :app:dexDebug Unknown source file : Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space Unknown source file : 1 error; aborting :app:dexDebug FAILED FAILURE: Build failed with an exception. * W... Read more 15 Nov 2015 - less than 1 minute read