Search in sources :

Example 1 with OnRepeatListener

use of org.videolan.vlc.gui.helpers.OnRepeatListener in project vlc-android by videolan.

the class VideoPlayerActivity method showDelayControls.

public void showDelayControls() {
    mTouchAction = TOUCH_NONE;
    if (!mDisplayManager.isPrimary())
        showOverlayTimeout(OVERLAY_INFINITE);
    ViewStubCompat vsc = (ViewStubCompat) findViewById(R.id.player_overlay_settings_stub);
    if (vsc != null) {
        vsc.inflate();
        mPlaybackSettingPlus = (ImageView) findViewById(R.id.player_delay_plus);
        mPlaybackSettingMinus = (ImageView) findViewById(R.id.player_delay_minus);
    }
    mPlaybackSettingMinus.setOnClickListener(this);
    mPlaybackSettingPlus.setOnClickListener(this);
    mPlaybackSettingMinus.setOnTouchListener(new OnRepeatListener(this));
    mPlaybackSettingPlus.setOnTouchListener(new OnRepeatListener(this));
    mPlaybackSettingMinus.setVisibility(View.VISIBLE);
    mPlaybackSettingPlus.setVisibility(View.VISIBLE);
    mPlaybackSettingPlus.requestFocus();
    initPlaybackSettingInfo();
}
Also used : ViewStubCompat(android.support.v7.widget.ViewStubCompat) OnRepeatListener(org.videolan.vlc.gui.helpers.OnRepeatListener)

Example 2 with OnRepeatListener

use of org.videolan.vlc.gui.helpers.OnRepeatListener in project vlc-android by videolan.

the class VideoPlayerActivity method initSeekButton.

private void initSeekButton() {
    mHudBinding.playerOverlayRewind.setOnClickListener(this);
    mHudBinding.playerOverlayForward.setOnClickListener(this);
    mHudBinding.playerOverlayRewind.setOnTouchListener(new OnRepeatListener(this));
    mHudBinding.playerOverlayForward.setOnTouchListener(new OnRepeatListener(this));
}
Also used : OnRepeatListener(org.videolan.vlc.gui.helpers.OnRepeatListener)

Example 3 with OnRepeatListener

use of org.videolan.vlc.gui.helpers.OnRepeatListener in project vlc-android by videolan.

the class PlaybackSpeedDialog method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.dialog_playback_speed, container);
    mSpeedValue = (TextView) view.findViewById(R.id.playback_speed_value);
    mSeekSpeed = (SeekBar) view.findViewById(R.id.playback_speed_seek);
    mPlaybackSpeedIcon = (ImageView) view.findViewById(R.id.playback_speed_icon);
    mPlaybackSpeedPlus = (ImageView) view.findViewById(R.id.playback_speed_plus);
    mPlaybackSpeedMinus = (ImageView) view.findViewById(R.id.playback_speed_minus);
    mSeekSpeed.setOnSeekBarChangeListener(mSeekBarListener);
    mPlaybackSpeedIcon.setOnClickListener(mResetListener);
    mPlaybackSpeedPlus.setOnClickListener(mSpeedUpListener);
    mPlaybackSpeedMinus.setOnClickListener(mSpeedDownListener);
    mSpeedValue.setOnClickListener(mResetListener);
    mPlaybackSpeedMinus.setOnTouchListener(new OnRepeatListener(mSpeedDownListener));
    mPlaybackSpeedPlus.setOnTouchListener(new OnRepeatListener(mSpeedUpListener));
    mTextColor = mSpeedValue.getCurrentTextColor();
    getDialog().setCancelable(true);
    getDialog().setCanceledOnTouchOutside(true);
    Window window = getDialog().getWindow();
    window.setBackgroundDrawableResource(UiTools.getResourceFromAttribute(getActivity(), R.attr.rounded_bg));
    window.setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
    return view;
}
Also used : Window(android.view.Window) OnRepeatListener(org.videolan.vlc.gui.helpers.OnRepeatListener) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View)

Example 4 with OnRepeatListener

use of org.videolan.vlc.gui.helpers.OnRepeatListener in project vlc-android by GeoffreyMetais.

the class PlaybackSpeedDialog method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.dialog_playback_speed, container);
    mSpeedValue = view.findViewById(R.id.playback_speed_value);
    mSeekSpeed = view.findViewById(R.id.playback_speed_seek);
    mPlaybackSpeedIcon = view.findViewById(R.id.playback_speed_icon);
    mPlaybackSpeedPlus = view.findViewById(R.id.playback_speed_plus);
    mPlaybackSpeedMinus = view.findViewById(R.id.playback_speed_minus);
    mSeekSpeed.setOnSeekBarChangeListener(mSeekBarListener);
    mPlaybackSpeedIcon.setOnClickListener(mResetListener);
    mPlaybackSpeedPlus.setOnClickListener(mSpeedUpListener);
    mPlaybackSpeedMinus.setOnClickListener(mSpeedDownListener);
    mSpeedValue.setOnClickListener(mResetListener);
    mPlaybackSpeedMinus.setOnTouchListener(new OnRepeatListener(mSpeedDownListener));
    mPlaybackSpeedPlus.setOnTouchListener(new OnRepeatListener(mSpeedUpListener));
    mTextColor = mSpeedValue.getCurrentTextColor();
    getDialog().setCancelable(true);
    getDialog().setCanceledOnTouchOutside(true);
    Window window = getDialog().getWindow();
    window.setBackgroundDrawableResource(UiTools.getResourceFromAttribute(getActivity(), R.attr.rounded_bg));
    window.setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
    return view;
}
Also used : Window(android.view.Window) OnRepeatListener(org.videolan.vlc.gui.helpers.OnRepeatListener) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View)

Example 5 with OnRepeatListener

use of org.videolan.vlc.gui.helpers.OnRepeatListener in project vlc-android by GeoffreyMetais.

the class VideoPlayerActivity method initSeekButton.

private void initSeekButton() {
    mHudBinding.playerOverlayRewind.setOnClickListener(this);
    mHudBinding.playerOverlayForward.setOnClickListener(this);
    mHudBinding.playerOverlayRewind.setOnTouchListener(new OnRepeatListener(this));
    mHudBinding.playerOverlayForward.setOnTouchListener(new OnRepeatListener(this));
}
Also used : OnRepeatListener(org.videolan.vlc.gui.helpers.OnRepeatListener)

Aggregations

OnRepeatListener (org.videolan.vlc.gui.helpers.OnRepeatListener)6 ViewStubCompat (android.support.v7.widget.ViewStubCompat)2 View (android.view.View)2 Window (android.view.Window)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2