当前位置: 首页>>代码示例>>Java>>正文


Java BuildConfig.tv方法代码示例

本文整理汇总了Java中org.videolan.vlc.BuildConfig.tv方法的典型用法代码示例。如果您正苦于以下问题:Java BuildConfig.tv方法的具体用法?Java BuildConfig.tv怎么用?Java BuildConfig.tv使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.videolan.vlc.BuildConfig的用法示例。


在下文中一共展示了BuildConfig.tv方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPause

import org.videolan.vlc.BuildConfig; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onPause() {
    super.onPause();
    mSeekbar.setOnSeekBarChangeListener(null);
    mLock.setOnClickListener(null);
    mPlayPause.setOnClickListener(null);
    mPlayPause.setOnLongClickListener(null);
    mLength.setOnClickListener(null);
    mTime.setOnClickListener(null);
    mSize.setOnClickListener(null);

    /* Stop the earliest possible to avoid vout error */
    if (isFinishing())
        stopPlayback();
    else if (BuildConfig.tv && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !requestVisibleBehind(true))
        stopPlayback();
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:19,代码来源:VideoPlayerActivity.java

示例2: onBackPressed

import org.videolan.vlc.BuildConfig; //导入方法依赖的package包/类
@Override
public void onBackPressed() {
    if (mLockBackButton) {
        mLockBackButton = false;
        mHandler.sendEmptyMessageDelayed(RESET_BACK_LOCK, 2000);
        Toast.makeText(this, getString(R.string.back_quit_lock), Toast.LENGTH_SHORT).show();
    } else if (mDelay != DelayState.OFF){
        endDelaySetting();
    } else if (BuildConfig.tv && mShowing && !mIsLocked) {
        hideOverlay(true);
    } else
        exitOK();
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:14,代码来源:VideoPlayerActivity.java

示例3: dispatchGenericMotionEvent

import org.videolan.vlc.BuildConfig; //导入方法依赖的package包/类
@TargetApi(12) //only active for Android 3.1+
public boolean dispatchGenericMotionEvent(MotionEvent event){
    if (mIsLoading)
        return  false;
    //Check for a joystick event
    if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) !=
            InputDevice.SOURCE_JOYSTICK ||
            event.getAction() != MotionEvent.ACTION_MOVE)
        return false;

    InputDevice mInputDevice = event.getDevice();

    float dpadx = event.getAxisValue(MotionEvent.AXIS_HAT_X);
    float dpady = event.getAxisValue(MotionEvent.AXIS_HAT_Y);
    if (mInputDevice == null || Math.abs(dpadx) == 1.0f || Math.abs(dpady) == 1.0f)
        return false;

    float x = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_X);
    float y = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_Y);
    float rz = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_RZ);

    if (System.currentTimeMillis() - mLastMove > JOYSTICK_INPUT_DELAY){
        if (Math.abs(x) > 0.3){
            if (BuildConfig.tv) {
                navigateDvdMenu(x > 0.0f ? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT);
            } else
                seekDelta(x > 0.0f ? 10000 : -10000);
        } else if (Math.abs(y) > 0.3){
            if (BuildConfig.tv)
                navigateDvdMenu(x > 0.0f ? KeyEvent.KEYCODE_DPAD_UP : KeyEvent.KEYCODE_DPAD_DOWN);
            else {
                if (mIsFirstBrightnessGesture)
                    initBrightnessTouch();
                changeBrightness(-y / 10f);
            }
        } else if (Math.abs(rz) > 0.3){
            mVol = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
            int delta = -(int) ((rz / 7) * mAudioMax);
            int vol = (int) Math.min(Math.max(mVol + delta, 0), mAudioMax);
            setAudioVolume(vol);
        }
        mLastMove = System.currentTimeMillis();
    }
    return true;
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:49,代码来源:VideoPlayerActivity.java

示例4: applyTheme

import org.videolan.vlc.BuildConfig; //导入方法依赖的package包/类
private void applyTheme() {
    boolean enableBlackTheme = mSettings.getBoolean("enable_black_theme", false);
    if (BuildConfig.tv || enableBlackTheme) {
        setTheme(R.style.Theme_VLC_Black);
    }
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:7,代码来源:AudioPlayerContainerActivity.java


注:本文中的org.videolan.vlc.BuildConfig.tv方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。