Static Methods and variables in Kotlin

I presume most Java programmers write some helper static methods and most probably even have some helper class including just these. So sooner or later you will need to write static methods like this in Kotlin.

public static float getPxFromDp(Context context, float dp) {
        Resources r = context.getResources();
        return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics());
    }

But you will find out you there is not anything like a static method in Kotlin. Fortunately, there are ways around this.
Continue reading

Kotlin Edu

There is a lot of ways how to learn Kotlin. Language reference, tutorials, video tutorials, online courses and much more. And now also Kotlin Edu.

Kotlin Educational Tools is Android Studio Plugin that helps you learn Kotlin by giving you small tasks. Read task description, write code and check. And if you cannot find the solution, you can click on Fill answer placeholders to get a right answer. Task description usually includes a link to Kotlin reference page, so you get right at the page with all you need to study to finish a task. It first looks like this.
Continue reading

First Post

This is the first post on this blog. I will write mostly about Android programming. About things, I encounter that I find tricky or interesting. I might write about things I am currently studying and trying to make sense of. Because, after first few posts I have prepared, I can say writing about a problem is the best way how to understand it. There will be posts about Kotlin, Android Studio tips and tricks, Google tools, good (bad) old Java and other. Let’s start.

Suntime

Do you wonder when to wake up to see sunrise or whether you can go for walk in daylight on cold winter day? Search no more!
Suntime is as simple as it can get. Just select your location and see when sun comes and goes in next 14 days. Add widget to home screen and see time anytime you unlock phone.


Get it on Google Play

Reader’s Diary 2.7

New version brings you ability to give book a color and set book abandoned if it is really boring and you don’t want to read it anymore. There are many fixes and barcode scanner performance is higher.

Get it on Google Play

Reader’s Diary 2.6


With new version of Reader’s Diary there is no need to fill all details. You can scan barcode to search for and automatically insert book name and author.

Get it on Google Play

Reader’s Diary is coming to Windows!

Reader’s Diary app for Windows 10 devices has been published on store. It works on phones, tablets and PC and might work on other types of devices in the future. App offers functionality of it’s Android counter part and more. You can scan barcode to search for and automatically insert book name and author.

Get it on Windows 10

Reader’s Diary 2.5

I have just published new version of app. There are UI improvements and some bug fixes.

Reader’s Diary 2.1

New version of Reader’s Diary brings completely new UI and tablet support as well as possibility to backup to JSON file and various fixes. I hope this will completely change user experience. Please let me know if you like it.

Get it on Google Play

OpenTTD Timetable Tools 1.1

Year after release, OpenTTD Timetable Tools has been updated. Most of the app has been rewritted and new version brings new user interface, huge number of error fixes and possiblity to copy and share your timetable.

Get it on Google Play

Continue reading