Add the following lines to your root build.gradle:
allprojects {
repositories {
[...]
maven { url "https://jitpack.io" }
}
}
Then reference the library from your module's build.gradle:
dependencies {
[...]
compile 'com.github.7factory:mia-leanback:x.y'
}
- Extend from
LeanbackActivity
.
public class MainActivity extends LeanbackActivity {
[...]
}
- Configure your leanback experience, f.e. enter fullscreen on landscape.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Enter fullscreen on landscape
forceFullscreenOnLandscape(true);
[...]
}
- Leanback!
📺