fenster icon indicating copy to clipboard operation
fenster copied to clipboard

Improvement/bugfix for SimpleMediaFensterPlayerController

Open MFlisar opened this issue 9 years ago • 2 comments

  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 avatar Feb 25 '16 10:02 MFlisar

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

MFlisar avatar Dec 12 '16 11:12 MFlisar

I would love some contributions, definitely yes!

On Mon, Dec 12, 2016, 11:28 AM MFlisar [email protected] wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/malmstein/fenster/issues/30#issuecomment-266405339, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgcnQhQFt0KRMcIsfk2eIGlr_k1ySr7ks5rHS_MgaJpZM4HinEz .

--

*David González * E: [email protected] T: @dggonzalez http://twitter.com/dggonzalez W: http://www.malmstein.com

malmstein avatar Dec 12 '16 12:12 malmstein