Visit GitHub RepoTV


Android Arsenal ![MethodsCount]( count-core: 817 | deps: 15173-e91e63.svg)

A library for Android TV that extends the Leanback library capabilities by offering a set of more powerful features.


The Leanback library is astonishing in many different aspects, and Google has done an insanely good job at easing the developer's task of creating an awesome TV app. But Leanback comes with some limitations, and at some point, those limitations are just too big to be ignored.

These are some of the features that you get by using Sofa:

  • Support for multiple rows per each category
  • Support for custom fragments and manual focus handling
  • Backwards compatible to standard implementation
  • .. the same goes for BrowseSupportFragment!

Check the video below to see Sofa in action:

Sofa - Demo

How to use

Simply migrate from to com.sgottard.sofa.BrowseFragment. That's it!

The best place to start is the demo project, more specifically the DemoActivity class.

To showcase a small example of one of the core features offered by Sofa, this is all it takes to load multiple rows for each header, something that has been asked for countless times over the past year:

  1. Create a RowsFragment
  2. Create an ArrayObjectAdapter with a ListRowPresenter and fill it as you normally do
  3. Set the adapter to RowsFragment
  4. Create another ArrayObjectAdapter (no need for a Presenter)
  5. Add a new ListRow that contains the RowsFragment instance and the corresponding HeaderItem
  6. Set the adapter to BrowseFragment

Pretty simple, uh? All the classes should be familiar to anyone that has used Leanback before, and so should be the use of those components.

I started populating the project's Wiki, in order to better explain what differences stand between the BrowseFragment component offered by Sofa and its original counterpart, and how to make the best out of Sofa.


Download the latest JAR


or grab via Gradle

dependencies {
    compile 'com.github.dextorer:sofa:1.0.0'


Sofa depends on Leanback to work! Be sure to add the latest Leanback library version to your Gradle build file:

compile ''


Sofa is built using part of Leanback's source code, mainly the BrowseFragment and BrowseSupportFragment classes. The direct dependencies for those classes had to be imported as well, but are mostly untouched. Every other class is still part of Leanback.


Feedback and contributions are extremely welcome. If you feel like something is missing, please submit a request or simply consider adding it yourself.

Follow me

Twitter Google+ LinkedIn


Copyright 2015, Sebastiano Gottardo.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer

Become Pro in Android by watching videos