App Development

Android Development Tidbits // No. 1

Today, we are excited to kick off the Android Development Tidbits series on the blog. The Android team at WillowTree has a tradition of sharing quick lessons we call “tidbits” on our Slack channel throughout the week, and now we’ll be posting some of those tidbits to the blog for you.

We encourage everyone to tidbit as much as they want throughout the week (even if a tidbit seems obvious) because it might help someone later. Some of the tidbits you will already know and some of them you won’t. Either way, we hope the information we share here helps you improve your coding skills and that you enjoy our first collection of tidbits. Feel free to leave us your questions and comments.

Tidbit One

Did you know that AndroidStudio has an asset generator for stock actionbar icons? Just go to:

[File] >[New] >[Image Asset]

From there, select “Clipart” for easy stock components. Doing this gives your designer one less thing to worry about, and it gives you just enough time to fix that padding issue you’ve been ignoring. You know…that one. blog-post-image android-tidbits CF-398x282@2x

Tidbit 2

Do you have a reason to run an individual Gradle test? Just run:

./gradlew testDebug --tests='\*.<testname>'

Tidbit 3

Use strict mode to make sure you aren’t doing things on the main thread you shouldn’t be. Remember to turn this off in release though, it can have performance implications itself, causing crashes if you leave it configured that way.

if (BuildConfig.DEBUG) {
 StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
 StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()

Tidbit 4:

You can set a RequestTransformer on Picasso to modify the request url. For example, adding image width and height url parameters.

Tidbit 5:

if you set android:windowSoftInputMode="adjustResize" for an activity in the manifest, then a ScrollView (or other collapsable ViewGroups) will shrink to accommodate the soft keyboard. But, if you set android:windowFullscreen="true" in the activity’s theme, then the ScrollView won’t shrink because it’s forced to fill the whole screen. However, setting ndroid:fitsSystemWindows="false" in your theme also causes adjustResize not to work.

Xcode Cloud: Choosing the Right Continuous Integration and Delivery Tool for Your Team

Apple recently announced the release of Xcode Cloud at the latest iteration of their...

Read the article