Infinite scroll for RecyclerView in Android

2016-02-28 Android, Java, Open source, UI 5 comments


Three years ago I wrote short article about Endless ListView in Android. This solution was dedicated to ListView, wasn’t perfect and generic. Moreover, lot of people asked questions about this solution and they weren’t sure how to use it properly. I also had some problems with implementing endless scroll AKA infinite scroll in Android apps. In addition, in the newest Android SDK it’s recommended to use RecyclerView instead of ListView. For a long time I couldn’t find the right implementation of the infinite scroll AKA endless scroll for Android. A few solutions I’ve found weren’t production ready, weren’t working correctly or had too many features. I wanted to have small, easy and flexible solution to implement infinite scroll for Android, which works with RecyclerView from the newest Android API. That’s why I created new project called InfiniteScroll, which helps to implement infinite scroll on Android. Library is tested and its behavior is documented by appropriate unit tests. If you would like to see it in action, check out gif animation presenting how sample app works. Library is very tiny, but does its job.

How to use it?

First of all, we need to add library dependency to our build.gradle file:

dependencies {
  compile 'com.github.pwittchen:infinitescroll:0.0.1'

We also need to create necessary fields in our Activity:

public RecyclerView recyclerView;
private LinearLayoutManager layoutManager;

Next, we need to create new InfiniteScrollListener:

Then, we need to initialize RecyclerView and LinearLayoutManager in our Activity and add previously created listener to RecyclerView:

If we want to display loading progress, we should add additional view for it, show it while loading starts and hide it when loading is finished.

That’s it!

Please note: We can also implement “Load more” button with that library. Instead of loading items immediately, we can display such button when user scrolled to the end of the list.

Exemplary apps

You can see how, library can be implemented in the following places:

  • Sample app from main repository, which loads Strings into RecyclerView
  • Search Twitter app, which allows to search tweets and scroll them infinitely


I think, this time infinite scroll is implemented in the right and re-usable way. I hope, it will make your life easier while developing your apps.

Source code of the library can be found at: https://github.com/pwittchen/InfiniteScroll.

Gnome Classic desktop environment on Ubuntu

2015-08-23 Linux, Ubuntu, UI No comments


I was tired of non-minimal and quite slow Unity desktop environment. Of course, I performed a few tricks to make Unity faster, but still I wasn’t satisfied enough. I checked out different desktop environments. I wanted to have clean, minimal and productive environment. I like top panel from Unity as well as HUD and many workspaces. The last thing is quite common among different desktop environments.

New desktop environment

I decided to choose Gnome classic. It’s fast, clean, minimal, works easily with Ubuntu, has top panel and is configurable.
My current desktop looks like this:


Unfortunately, I don’t have HUD like in Unity, but after a few days I got used to that. I also turned off all animations and visual effects. Everything works smoothly and looks much better than Unity. In the current configuration I have: Z Shell, Oh-my-zsh, dmenu, Numix Theme and Numix Circle Icons. In addition, I have the same indicators, which I had earlier on Unity and they work fine. I just needed to adjust look of Spotify icon in top panel. Moreover, Gnome Pie was installed later as additional launcher and media controller.

Installation of Gnome Classic and Numix Theme

I’ve installed Gnome Classic as follows:

sudo apt-get install gnome-session-fallback

Then, I installed Gnome Tweak Tool and Unity Tweak Tool:

sudo apt-get install gnome-tweak-tool unity-tweak-tool

and Compiz Config Manager with plugins:

sudo apt-get install compizconfig-settings-manager compiz-plugins-extra

Please note: to enable alt+tab in gnome classic fallback, open the manager and navigate to window management and check application switcher (previously disabled).

After that I could install Numix icons and theme:

sudo add-apt-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-gtk-theme numix-icon-theme numix-icon-theme-circle

I’ve set appropriate theme and icons via Gnome Tweak Tool. After reboot of the computer changes should be successfully applied.

Detailed information about configuration

If you’re interested in detailed configuration information, you can check out my dotfiles at: https://github.com/pwittchen/dotfiles and system configuration at: https://github.com/pwittchen/ubuntu-config.

To generate system information for the screenshot I used screenfetch script. I didn’t worked correctly for gnome-session-fallback, but I’ve made small contribution on GitHub and now it’s fine.


You can find wallpaper from the screenshot at papers.co website.

Alternatives & Resources

I’ve spent some time on analyzing alternative desktop environments and Linux based operating systems, which looks good.
Below, you can find my collection of information and resources. Maybe some of them will be better for your specific needs.

Interesting Reddit channels:

Selected Linux based systems with interesting user interface:

Selected Linux window managers:


After switching from Unity to Gnome my desktop is much more better, faster and cleaner. After mastering popular shortcuts for managing programs, windows, workspaces, etc. we can work very efficiently. Gnome Classic is fine for me right now, but maybe other WM will be better for you. It depends on your personal preferences. I’m gonna use Gnome Classic for some time and maybe I’ll try other environments in the future. For sure I won’t go back to Unity if it don’t evolve.

Start Bootstrap – clean open-source website templates

2015-03-08 UI, Web Development No comments

I recently found Start Bootstrap website. It contains free, elegant & simple open-source website templates, which can be used in any web project. E.g. private site, blog, company website, website of a product, admin panel, dashboard or web interface for a specific back-end.

What I like most is the fact that these templates are hosted as open-source repositories on GitHub at: https://github.com/ironsummitmedia/startbootstrap/ and are continuously maintained. In addition, every template has its own repository. Links to these repositories are provided in README.md file in mentioned main repository and on the startbootstrap.com website. Nicely done.

7 Rules for Creating Gorgeous UI

2014-11-23 Design, UI No comments


When we start creating good, clear and consistent UI, we should make some assumptions.
We can follow such rules:

  1. Light comes from the sky
  2. Black and white first
  3. Double your whitespace
  4. Learn the methods of overlaying text on images
  5. Make text pop and un-pop
  6. Only use good fonts
  7. Steal like an artist


There is quite interesting article about creating gorgeous UI, which describes mentioned rules in details and is divided into two parts:

Some aspects are obvious, but it’s good summary.