Hard to disagree with any of the points made.
What's your main development machine?
Asked by Anonymous
24th March 2014
The worst thing about a three-day weekend is that there’s only three days in it. I’ve made some very good progress working on Journal these last 3 days, and it gave me confidence for moving forward.
One of the earliest decisions I made when I made up my mind to build Journal was that I’d have a custom font in the app. Some of the apps with best-in-class design on Android have custom typography work, and so will Journal.
After reading the Smashing Magazine article, “Taking a Second Look at Free Fonts”, I’ve decided to go for one of the typefaces featured in that article, namely Alegreya (OTF available for free at FontSquirrel). A typeface designed for literature, it immediately struck me as being perfect for typing and reading Journal entries.
I’ve made some attempts at using Alegreya for the rest of the UI as well (just action bar titles so far), but I’m less sure it would be appropriate there. A sans-serif typeface could be better suited for that purpose, possibly something like Adobe’s Source Sans.
(Alegreya in the diary entry body and the action bar title)
Writing a new Journal entry
I’ve implemented some of the basic behavior I wanted to get done for the “new entry” screen:
- The keyboard now automatically appears and the user can start typing right away
- The entry’s text field resizes automatically to fit the space available on the screen when the keyboard shows and when it’s hidden
- The save button in the action bar actually causes the entry to be written to the device’s internal storage
- The entries are stored in Property list files formatted exactly the same as those used by Day One. In the long run, this will help using Journal with a Day One entries store
Here’s what the entry’s text field resizing looks like (its bottom is marked by the blue bracket):
Listing previous entries has been by far the most challenging aspect of the app so far. I had to learn about ListViews, Adapters, Providers, and slightly more advanced (for my level) aspects of the Java language such as interfaces, exception catching, etc.
The official API guide for List View has been quite helpful, as well as the Tuts+ Android course lesson on list views. The video lesson itself is behind a paywall, but the sample code is available on GitHub, and it’s plenty good enough to figure things out.
Here’s how it looks so far:
Obviously, it’s nowhere near done yet, but I’m really happy that it actually loads the content and dates of the entries from internal storage. Other challenging aspects of implementing this view were that this is a brand new Activity in the app (the default one that appears when the app starts, for now), and the “Add” button in the action bar, wired to summon the “new entry” activity.
All in all, I’m very happy with the progress so far, and pleasantly surprised with how fun and accessible the development process has been so far. If only I had more three-day weekends!
22nd March 2014
Quite pleased with myself today — managed to get the new entry screen going to a fairly nice extent. Learned about the Activity lifecycle, Fragments, and wrestled for a couple of hours with my very first Thing I Can’t Wrap My Head Around: how to show the keyboard when I focus a text field.
That latter part is still quite mysterious to me. There’s a bunch of posts related to this issue, but most of them concern an EditText in a dialog. Mine is in a fragment.
I solved the issue by removing the
android:textIsSelectable="true" property from the EditText’s XML file, but I don’t yet understand why this affected the keyboard’s showing on focus. Especially since I’m still able to select text after removing that property, though the documentation implies that I shouldn’t be able to.
18th March 2014
Haven’t spent as much time on Journal as I would’ve liked these last few days, unfortunately, but there’s been some progress anyway.
Switched to Android Studio
I belatedly came to the realization that Android Studio is based on IntelliJ, and isn’t that different UI-wise, so tutorials designed for IntelliJ should require minimal adaptation. The benefits of using Studio right away are learning directly with what’s going to be the official toolchain down the line, as well as using some more up to date tools (Gradle instead of Maven as a build system, for example), even though I don’t yet fully understand the implications or differences between these tools.
Also started using the Genymotion emulator instead of the extremely slow one that comes with the Android SDK — it’s fast and responsive, even on my small Macbook Air.
Started the “Android for the Busy Developer” course on Tuts+
Seems like a very decent, and most importantly recent (September 2013) course on Android development. Maybe a bit on the short side, but nonetheless the first few videos I’ve watched have been quite helpful. This course required a $19/month subscription to Tuts+ Premium, but I expect I won’t need to pay for more than a month, as the course isn’t very long (12 lessons). A couple of lessons can be viewed online for free.
Dropped Android Bootstrap
Since I’m targeting Android 4.4, I will have many rather advanced and hopefully mature “vanilla” frameworks at my disposal, and I want to get familiar with those before diving into the third-party libraries in Android Bootstrap. First things first.
The screenshot above shows my effort so far — scaffolding an app with a simple text view, a navigation drawer and a context menu was very easy.
13th March 2014
One of the apps I’ve been dearly missing from my iPhone days is Day One, a fantastic journal app that I actually used to write a journal for almost two years (the app is also available for Mac, but I wrote almost exclusively on my phone).
Since switching to Android, I have been on the lookout for a good alternatives. Some similar apps exist (such as Day Journal), but none offer a good enough user experience or a pleasant enough UI for me to want to use.
So I’ve decided to bite the bullet and scratch my own itch, by building a worthy Day One alternative for Android.
I’m temporarily calling it "Journal".
My basic user stories for Journal are:
- As a user, I want to be able to use my existing Day One library (stored on Dropbox)
- As a user, I want to see a chronological list of my journal entries
- As a user, I want to write a timestamped text entry
- As a user, I want to add a single photo to an entry
- As a user, I want access to my entries to be protected by a simple PIN code
So, nothing mind-blowingly difficult here. However, I’d also like the app to have a top-tier UI (not many Android apps do — I’m aiming for something like Foursquare, here), so in order to make that easy, I’m going to target a single device (Nexus 5) and a single Android version (4.4 Kitkat) to begin with. The goal is to get the app up and running as soon as possible.
Picking the right tools
The first step was to pick the right tools to build this. Currently, there are four options for building an Android app:
- Eclipse with the ADB plugin (the legacy way)
- IntelliJ IDEA
- Android Studio (the edge way)
- command line tools (the hardcore way)
My first instinct would be to use the command line tools, as I would love to be able to use Vim, but I figured that before I start defininig my own workflows, I should get familiar with some of the standards. After reading a few comments on /r/androiddev and looking at Android Bootstrap, I’ve decided to use IntelliJ IDEA as well the aforementioned Android Bootstrap.
To be continued!
I attended the first-ever Tokyo Google Glass Meetup yesterday, organized by Héctor of Kirainet fame. Enjoyed talking with other neds about Google Glass and its potential, and gave a talk myself about my bitter-sweet experience with Glass so far (slides linked above).
Yes, I still don’t have a title. That’s because I still am not happy with the lyrics, they don’t make sense yet. But I’ve been writing in all the parts as they come to me, figuring I’ll edit later. Next time, I’ll take the time to just figure each part out at the beginning, as far as pitches and…
Sara has been working on music production. Proud to see her release a brand new song today!