Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/bugfix for SimpleMediaFensterPlayerController #30

Open
MFlisar opened this issue Feb 25, 2016 · 2 comments
Open

Improvement/bugfix for SimpleMediaFensterPlayerController #30

MFlisar opened this issue Feb 25, 2016 · 2 comments

Comments

@MFlisar
Copy link

MFlisar commented Feb 25, 2016

  1. Bug: Currently this Controller does not handle the rewind/forward button clicks... They simple don't have click listeners and do nothing.
  2. Suggestion: add a function to even hide the two buttons for a even more simple layout...
  3. Suggestion: allow to theme the progress bar

For 2 and 3 I use currently some solution via reflection (just to show you what I would suggest to be available without reflection):

fensterSimpleVideoController.post(new Runnable()
{
    @Override
    public void run()
    {
        try
        {
            Class<?> c = fensterSimpleVideoController.getClass();
            Field mProgress = c.getDeclaredField("mProgress");
            mProgress.setAccessible(true);
            SeekBar seekbar = (SeekBar) mProgress.get(fensterSimpleVideoController);
            ThemeManager.get().themeSeekbar(seekbar);

            Field mNextButton = c.getDeclaredField("mNextButton");
            Field mPrevButton = c.getDeclaredField("mPrevButton");
            mNextButton.setAccessible(true);
            mPrevButton.setAccessible(true);

            ((View) mNextButton.get(fensterSimpleVideoController)).setVisibility(View.GONE);
            ((View) mPrevButton.get(fensterSimpleVideoController)).setVisibility(View.GONE);
        }
        catch (IllegalAccessException e)
        {

        } catch (NoSuchFieldException e)
        {

        }
    }
});
@MFlisar
Copy link
Author

MFlisar commented Dec 12, 2016

Would you accept a pull request? I would have some small other changes as wel...

@malmstein
Copy link
Owner

malmstein commented Dec 12, 2016 via email

@MFlisar MFlisar mentioned this issue Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants