Giter Site home page Giter Site logo

android-tv-epg's Introduction

Electronic Program Guide for Android

Click for video

This is a "classic" TV EPG which works on tablets and phones and allows you to scroll in all directions (horizontal, vertical and diagonal). Example project is located in repo but in short you need to add the EPG to your xml or by code:

<se.kmdev.tvepg.epg.EPG
    android:id="@+id/epg"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Then by code adding a click listener...

epg.setEPGClickListener(new EPGClickListener() {
        @Override
        public void onChannelClicked(int channelPosition, EPGChannel epgChannel) {
            // Channel clicked
        }

        @Override
        public void onEventClicked(int channelPosition, int programPosition, EPGEvent epgEvent) {
            // Program event clicked
        }

        @Override
        public void onResetButtonClicked() {
            // Reset button clicked
        }
  });

... and data to be shown.

epg.setEPGData(new EPGDataImpl(MockDataService.getMockData()));

Thats basically it. If you want to use it in your project you need resources from the example project as well as the epg package for it to work. If you have any questions or such don't hesitate to contact me.

Good luck!

android-tv-epg's People

Contributors

blunan avatar korre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-tv-epg's Issues

library export

Hi I have question about this project. I am new with android and really don't know how to add this solution to my project, is it possible to import it as gradle dependency or as library to existing project?

thanks

Timebar's first item disappears on Scroll

Hi Korre,

I am facing an issue with the time bar while using EPGView, The time bar's first item disappears into a flash and doesn't look good. Please suggest removing this glitch.

REQUEST: Need Implementation Doc

Need proper docs on what these variables used for in the class EPG.java:

  • mTimeOffset
  • mMillisPerPixel
  • DAYS_BACK_MILLIS
  • DAYS_FORWARD_MILLIS
  • HOURS_IN_VIEWPORT_MILLIS

Android tv

Hi just stumbled on this project thanks for this project ,works great however was going to ask if its possible to make it work with remote control on android tv thanks , I use live channels for my apps but this would be a great option to add too thanks :)

Remove Image

Hi, i want to remove channel image. how can i achieve this.

Changing input data

How should I change MockDataService class for my own data, which are going in a strong order? What steps I need to do? Now there are random values from Lists.
I was trying to change some loops, for example:

        for (int i=0 ; i < availableChannelLogos.size(); i++) {
            EPGChannel epgChannel = new EPGChannel(availableChannelLogos.get(i),
                    "Channel " + (i+1), Integer.toString(i));

            result.put(epgChannel, createEvents(epgChannel, nowMillis));
        }

and

//        while (currentTime <= epgEnd) {
            for(int i = 0; currentTime <= epgEnd; i++){
                long eventEnd = getEventEnd(currentTime);
                EPGEvent epgEvent = new EPGEvent(currentTime, eventEnd, availableEventTitles.get(i));
                result.add(epgEvent);
                currentTime = eventEnd;
            }
//            long eventEnd = getEventEnd(currentTime);
//            EPGEvent epgEvent = new EPGEvent(currentTime, eventEnd, availableEventTitles.get(randomBetween(0, 6)));
//            result.add(epgEvent);
//            currentTime = eventEnd;
//        }

but I didn't think that I'm on the right way.

And with this method I even have no ideas how to change it for me:

    private static long getEventEnd(long eventStartMillis) {
        long length = availableEventLength.get(randomBetween(0,5));
        return eventStartMillis + length;
    }

disable auto scrolling on keyboard navigation

Hi,
how do we disable automatic scrolling on vertical keyboard navigation ? We want the grid to be static while you navigate vertically with keyboard, and only have the cursor move .

Laggy experience

I'm trying to implement your android-tv-epg in my app and I have some problems with the touchlistener that seems to be laggy when too much content is draw in the window. Your sample works fine because you have only big show (1-2hours) and few channels, but when you have 11 channel with a total of 120 shows to draw, it becomes laggy to fling.

Are you aware of this issue ? Do you have any idea how to fix it ?

求助

改项目为TV端,为何没有获取焦点的操作

need help

if i use this library in my phone then timebar interval is too close to each other in vertical mode.
How to set padding to time interval. because my event data is obverlapping when time interval is too close.

Plz help me
Screenshot 2019-04-15 at 12 08 17 PM

Espresso matchers for this view

Hey,

I'm wondering if you know if someone wrote matchers/interactors for testing this view with Espresso?

Regards,
Maciej Górski

Add horizontal scroll limits

Hi, when I load events starting at 10:00am and ending at 10:00pm, I'd like to prevent scrolling left and right when I reach the time limit.

Is it possibile to achieve without much pain?

Thanks

Help

Hello nice code.
Can you help me to integrate this in my android iptv app.how can i add a page EPG
and link it with channels.by ID numbers or somthing other.Also can we add it to fetch the epg source link from API Panel which is on Cloud PHP

Zoom in/out animation

Hi @korre, thanks for this great library! I would like to implement zoom in/out animation for EPGEvent cause some text cant be visible properly. My approach is to increase hours per pixel but when I increase it and redraw scroller stays behind at the old position. I tried to move it by startScrolling to the time of the event but it is not smooth.

Inflating in fragment

Hi there,

I wonder if it would be possible to use this EPG customview in a fragment? I was working all day long, but onDraw isn't be called in fragment, or I don't know how to manage that.

Any clue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.