Android - creating custom layout

If it is difficult to gain the desired effect using some standard layout (LinearLayout, GridLayout etc.) or a combination of them, it is relatively easy to programmatically create a custom layout class.

Read More

Android - how to open menu on old Android emulator

Older Android versions used a separate button to open a menu (which was then replaced by the action bar and its overflow menu). When testing applications using an emulator with some old Android, we often want to somehow access the menu. The emulators used to provide a button for this, but such buttons were shown only in a specific skin: Skin with dynamic hardware controls.

Read More

Java - custom stream performance

To implement a custom input stream in Java, the only mandatory method to implement is read(). However, a stream with only read() implemented can perform very badly.

Read More

C++ - Unicode conversions

How to convert strings in C++ between Unicode encodings (UTF-8, UTF-16 and UTF-32)? Here are some code snippets showing easiest ways I found out yet.

Read More

C++ - precompiled headers chaining

Similarly to Microsoft Visual Studio compiler, gcc and Clang compilers support precompiled headers, too. Let’s look at creating and using of a precompiled header in clang compiler, particularly at chaining of precompiled headers (building a precompiled header using another precompiled header compiled earlier).

Read More