Hello there everyone, welcome to my latest article. Today we’re going to play around with the new Navigation Architecture Components. Ok, maybe not so new 😃 but since it’s almost reaching it’s first stable release feels like a good time to write about it.
This article won’t be part of a series so I created a sample project just for it on GitHub, there’s a link at the bottom of the article.
…Hi everyone, after completing 2 series of articles, I think now I’m going to write some individual ones for a change. The goal of an article every 2 weeks for 2018 remains, so expect more. But let’s jump into today’s one.
In the last article of my London Tube Status Series, I showed a very simple UI test for the main screen of the app using Espresso and Kakao. It was not very detailed, so I decided to write a bit more about it, hence this article.
…Hi everyone. Welcome to article number 12 and last one of the Kotlin Playground Series. We got to the finish line. This is one doesn’t have any relevant content, it’s just a good bye and thanks for sticking around and reading all the articles and providing really nice feedback.
But I said my goal for 2018 was to write an article every 2 weeks so I have to stick to it, right? This one doesn’t really count, so today I also published the first article on my new series — London Tube Status App.
…Hi there everyone, welcome to number 11 in the Kotlin Playground Series. We’ll continue with standard functions, today will look at just one so it shouldn’t get too long.
We’re going to look into how to manage resources in Kotlin or in other words more common, how to handle try-with-resources. Let’s look at a couple of Java examples first to see what I’m talking about:
private String readFirstLine() throws FileNotFoundException {
BufferedReader reader = new BufferedReader(new FileReader("test.file"));
try {
return reader.readLine();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
That looks familiar, right? I’m sure you had to write something similar to this at some point and you would agree it’s a bit of a boring task to write all that boilerplate. And worse than that, how many times did you forget to call that close()
function in the finally
block?