• Stars
    star
    294
  • Rank 136,866 (Top 3 %)
  • Language
    Java
  • License
    Other
  • Created over 8 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Extended set of content cards for Android TV applications.

LeanbackCards

Live Card

Leanback cards is a Widget library for use with Android TV applications. It provides an extended set of customisable content cards to enhance your User Interfaces.

To begin with, you''ll need to add the dependency to your project as below:

compile 'com.hitherejoe.leanback:leanbackcards:0.1.0'

Think of this as a playground to try out the cards quickly and easily - so feel free to take the code and use it for the components you need!

The cards currently include:

Live Card

Live Card

A live card allows you to show a looping video when the card view becomes focused, allowing your browsing experience to feel more dynamic. You can add a live card in several ways:

  • By creating a new instance and setting it's properties programatically:
LiveCardView liveCardView = new LiveCardView(Context context);
liveCardView.setVideoViewSize(width, height)
liveCardView.setVideoUrl(videoUrl);
liveCardView.startVideo();
liveCardView.stopVideo();
liveCardView.setCardBackgroundColor(R.color.primary);
liveCardView.setTitleText(getString(R.string.title));
liveCardView.setTextColor(R.color.white);
  • By creating a new instance and passing in a style:
LiveCardView liveCardView = new LiveCardView(Context context, AttributeSet attrs);
<style name="LiveCardStyle">
    <item name="live_background_color">@color/primary</item>
    <item name="live_text_color">@color/white</item>
</style>

Loading Card

Loading Card

A loading card allows you to show a simple progress bar to make the user aware that content is being loaded. You can add a loading card in several ways:

  • By creating a new instance and setting it's properties programatically:
LoadingCardView loadingCardView = new LoadingCardView(Context context)

It's background color can be set using:

loadingCardView.setCardBackgroundColor(R.color.primary)

and you can check it is loading and set it's loading state like so:

loadingCardView.setLoading(true);
loadingCardView.setCardBackgroundColor(R.color.primary);
loadingCardView.setProgressColor(R.color.white);
boolean isLoading = loadingCardView.isLoading();
  • By creating a new instance and passing in a style:
LoadingCardView loadingCardView = new LoadingCardView(Context context, AttributeSet attrs)
<style name="LoadingCardStyle">
    <item name="loading_background_color">@color/primary</item>
    <item name="loading_progress_color">@color/white</item>
</style>

Tag Card

Tag Card

A tag card allows you to show an icon/text pair. You can add a tag card in several ways:

  • By creating a new instance and setting it's properties programatically:
TagCardView tagCardView = new TagCardView(Context context)
tagCardView.setCardBackgroundColor(R.color.primary)
tagCardView.setCardText(R.color.primary)
tagCardView.setCardTextColor(R.color.primary)
tagCardView.setCardIcon(R.drawable.ic_tag)
  • By creating a new instance and passing in a style:
TagCardView tagCardView = new TagCardView(Context context, AttributeSet attrs)
<style name="TagCardStyle">
    <item name="tag_card_background_color">@color/primary</item>
    <item name="tag_text_color">@color/white</item>
    <item name="tag_icon">@drawable/ic_tag</item>
</style>

Icon Card

Icon Card

An icon card allows you to display a title/detail pair with an icon for visual representation. You can add an icon card in several ways:

  • By creating a new instance and setting it's properties programatically:
IconCardView iconCardView = new IconCardView(Context context)
iconCardView.setCardBackgroundColor(R.color.primary);
iconCardView.setDetailBackgroundColor(R.color.primary_dark);
iconCardView.setTitleText(getString(R.string.your_string));
iconCardView.setDetailText(getString(R.string.your_string));
iconCardView.setTitleTextColor(R.color.white);
iconCardView.setDetailTextColor(R.color.white);
iconCardView.setIcon(R.drawable.ic_icon);
  • By creating a new instance and passing in a style:
IconCardView iconCardView = new IconCardView(Context context, AttributeSet attrs)
<style name="IconCardStyle">
    <item name="icon_card_background_color">@color/primary</item>
    <item name="icon_detail_background_color">@color/primary_dark</item>
    <item name="icon_title_text_color">@color/white</item>
    <item name="icon_detail_text_color">@color/white</item>
    <item name="icon_header_icon">@drawable/ic_icon</item>
</style>

More Repositories

1

animate

An application demoing meaningful motion on Android
Java
3,117
star
2

Android-Boilerplate

Android Boilerplate project using RxJava, Dagger 2, Espresso, Mockito + more!
Java
1,871
star
3

Bourbon

An MVP Dribbble client for Android Mobile, Tablet, Wear and TV.
Java
1,119
star
4

MVVM_Hacker_News

Android MVVM experiment project using the official Data Binding library
Java
881
star
5

ComposeAcademy-Playground

Playground project for the Jetpack Compose APIs
Kotlin
868
star
6

Vineyard

Vine client for Android TV
Java
725
star
7

minimise

Minimise app built using kotlin multiplatform
Kotlin
427
star
8

Tabby

A demo application for the new Android Custom Tabs support library
Java
414
star
9

Constraints

Sample application for the new Android ConstraintLayout
Java
326
star
10

Notifi

A demo app for the new Android N notification features
Java
199
star
11

AndroidTvBoilerplate

Android TV Boilerplate Project
Java
185
star
12

ComposeAcademy

Website providing snippets and examples for Jetpack Compose on the Android platform
SCSS
181
star
13

GithubTrending

An Android project for the Caster.io course on clean architecture
Kotlin
175
star
14

FlutterOAuth

A Flutter OAuth package for performing user authentication for your apps.
Dart
173
star
15

WatchTower

A sample application created to test, explore and demonstrate the Proximity Beacon API
Java
144
star
16

Mondroid

A simple Mondo client for Android
Java
134
star
17

BottomNavigationViewSample

A sample app for the new Bottom Navigation View from the Design Support library
Java
134
star
18

HackerNewsReader

Modern Hacker News reader with a Material Design look!
Java
113
star
19

Aware

A playground for the new Google Awareness API
Java
99
star
20

PublicSpeaking

A collection of my abstracts and other stuff related to public speaking
86
star
21

Pickr

A sample application demoing the Google Play Services Place Picker and Autocomplete
Java
85
star
22

Voice

A simple Flutter project demonstrating tailored native experiences
Dart
69
star
23

Android-Q-Playground

A playground for new Android Q features
Kotlin
54
star
24

MvpBoilerplate

An MVP Boilerplate to save me having to create the same project over from scratch every time! :)
Java
46
star
25

Tide

Unsplash client built using Flutter
Dart
36
star
26

KoinDemo

A demo app for the Koin Caster.io course
Kotlin
35
star
27

BrailleBox

A BrailleNews reader built with AndroidThings
Java
26
star
28

PictureInPicturePlayground

A playground for the new Android N Picture-in-Picture mode
Java
25
star
29

adoptr

Jetpack Compose Android Dev Challenge
Kotlin
21
star
30

ChordAssist

Kotlin
20
star
31

FootballFace

Android Wear watch faces for your favourite American Football team
Java
17
star
32

Compose-Navigation-Sample

Quick sample based on Compose + Navigation component
Kotlin
16
star
33

Hilt_Course

Code for the Hilt Course on Caster.io
Kotlin
13
star
34

Fret

A guitar chord tutor for google actions
JavaScript
13
star
35

HashTrack-Public

A flutter application to track hashtags for Twitter and Instagram
Dart
11
star
36

Attendee-Android

A conference app for Android built using Firebase
Kotlin
8
star
37

ComposeTv

Kotlin
7
star
38

Resources-for-Allyship

A personal list of article, books etc that I have read / watched which have helped me learn more around diversity and inclusion
6
star
39

flutter-bitrise

Dart
6
star
40

firebase_auth_multiplatform

Kotlin
5
star
41

sqlbrite_demo

A simple demo application for the SqlLite library by Square
Java
5
star
42

Fireside

Sample project for Firebase Remote Config Caster.IO lesson
Java
5
star
43

Androidx_webview_sample

Kotlin
3
star
44

Reactemon

A React-Native Pokedex for Android/iOS
JavaScript
3
star
45

Bastion

Kotlin
2
star
46

Hashtrack-ios

Hashtag tracker for iOS
Swift
1
star