android

android tips and tutorials

My “XOP” football game UI, v1.4 alvin July 13, 2019 - 8:24pm

The UI still needs a lot of work, but I like the idea of having an Inconceivable mode in the next version of my XO Play Android football game.

XO Play (Android football game) alvin July 3, 2019 - 7:13pm

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 alvin June 29, 2019 - 5:38pm

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:

Notes on how to build and run an Android application from the command line alvin March 6, 2019 - 8:21pm

As a brief note to self, this is how I compiled/built an Android application (APK) from the MacOS command line and then ran it in an emulator. I include both my application- and system-specific notes, as well as the more generic commands I found at this Android.com URL:

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.)