android

android tips and tutorials

XO Play (Android football game)

XO Play is a “thinking man’s” football game that I created for Android devices. It’s for those of us who enjoy thinking about football strategy, of how to take advantage of our strengths and our opponents’ weaknesses, and how to call plays to win games. If you’ve ever watched a football game and thought, “I can call plays better than this guy,” XO Play is for you.

Version 1.4

Version 1.4 introduces four game levels you can choose from:

XO Play help text

This is the “help” text for my Android football game XO Play.

Changes in Version 1.4

Released on July 14, 2019, Version 1.4 introduces four new game levels:

Where is the Android SDK located on macOS? (setting ANDROID_HOME)

If you’re using macOS and need to know where (in what directory) the Android SDK is located, it is currently located here:

~/Library/Android/sdk

The sdkmanager and avdmanager and a few others are located in this directory:

~/Library/Android/sdk/tools/bin

The Android SDK platform tools bin directory is here:

~/Library/Android/sdk/platform-tools

I’m doing some things with Android from the command line tonight and learned that I needed to set ANDROID_HOME, and that’s when I dug into this.

~ March, 2019

Android/Kotlin: A FloatingActionButton setOnClickListener Snackbar example

As a quick note to self, this is an example of how to implement a setOnClickListener on a FloatingActionButton with Android and Kotlin:

fab.setOnClickListener { view ->
    Snackbar.make(
        view,
        "An exciting message!",
        Snackbar.LENGTH_LONG
    ).setAction("Action", null).show()
}

Hopefully that’s enough to get “future me” pointed in the right direction when I need this again. :)

(There are more lambda details at this link.)