Android: Confirmation Dialog

Warning! This technique is suited to Android API Level 8-10 (Gingerbread). For Honeycomb or newer, use DialogFragment. Problem: my activity knows how to do something (delete a picture), but it needs to ask the user for confirmation first. Solution: pop a confirmation dialog, whose “yes” button responds by deleting the picture. Code:For the very simplest …

Read moreAndroid: Confirmation Dialog

Cross-platform problem solving: how an Android Pro Tip helps our web app design

Separation of concerns is a challenge in a web application. The quick, straightforward way to control a page winds up being messy, with business logic and application logic and view logic all mushed together. Here at my Stealth-Mode Startup, we’re using the Sitebricks web framework on top of Guice. One pain point in our webapps’ …

Read moreCross-platform problem solving: how an Android Pro Tip helps our web app design

IntelliJ IDEA 11

The new version of IntelliJ IDEA is out, and I’m liking it. Gradle integration: creating a new project from a build.gradle was smooth and easy. Then when dependencies were added to the gradle file, the gradle plugin came in handy. One line added to build.gradle apply plugin: ‘idea’ and then one execution of gradle idea …

Read moreIntelliJ IDEA 11

Setting up an Android project in IntelliJ Idea

And there was pain… I imported an existing Android project into IntelliJ Idea Community Edition 10.5.1. Some things started complaining “Please select Android SDK.” The help pages are out of date; they say to do this in the Android facet settings. It isn’t there. Here is the secret do-things-right button: Module settings (ctrl-alt-shift-S), then pick …

Read moreSetting up an Android project in IntelliJ Idea