homeAndroid Stuff

Basics for views and how to create your own

Jul 10, 2016

What is a view? Why would I create my own? and…how does it work?

If you don’t know whether you need a custom view or not, you probably don’t. Most UI elements can be easily expressed using the elements of the Android framework, the support library, or the Google design library.

If you still did not find what you were looking for try GitHub first. Especially for Android there are thousands of libraries, some of them might do what you want. And now that you still didn’t find anything that you can or want to use, because your usecase is very special in some way…Now I have to admit: You probably need a custom view.

Read More

Settling in with Firebase Analytics

Jun 12, 2016

You might have heard: Firebase is the new thing. It is here, it is awesome, and I believe it will make all of our lives somewhat easier.

If you decide to switch to Firebase you will end up using analytics within your app. The default reports alone are worth the few steps it takes to set it all up. Tracking events has never been easier and I am hooked, although, to me, Firebase Analytics seems more like something that I want to use in addition to Google Analytics. While Firebase helps me to get my app up and running, Google Analytics still shares some valuable insights.

Read More

Dagger 2 Basics

May 4, 2016

Dagger 2 can be confusing. This shall shed some light on the key concepts and highlight their proper use. You could start by reading the User’s Guide to acquire the general and official knowledge, and once you have brewed your coffee, pray, continue.

Read More

Relative Timespans

Feb 22, 2016

This is going to be a short post because I’ve seen a lot of custom implementations to provide the well known a few minutes ago labels, which are often hard to maintain and rarely properly localized.

There already is an implementation for this—no, it’s not JodaTime.

Read More

Custom Drawables and Animations

Jan 5, 2016

There are many opportunities where the usage of a custom drawable will lead to nice, clean, and reusable results. If you need to display changing text inside an icon or introduce a custom progress indicator like in Modifying the resource image of Progress Bar on Stack Overflow, you can easily do so with custom drawables.

Read More

Instrumentation Tests and Localized Screenshots

Dec 12, 2015

Testing is important, and you should be testing.

Testing on Android is still a big issue. Whether you feel that your app isn’t big or popular enough, or just don’t know how to start, there are many reasons why you won’t get involved with tests. But I find that writing testable code (and actual tests) can lead to far better, scalable, and maintainable software.

Read More

Animations and Decorations

Nov 18, 2015

Just a quick update to my last post on a little thing I missed out: Animations.

Read More

Using RecyclerView with ItemDecorations - A Basic Separator Sample

Nov 10, 2015

tl;dr You can find the sample on GitHub.

I’ve seen many people come up with complicated and bloated solutions to problems that can actually be solved with decorations quite easily. Generally speaking, by using decorations you can, without modifying any code in your adapter

  • add a Header / Footer View
  • add margins and separators
  • set backgrounds
  • and more.

Easily added and reused with one line of code.

Read More