android.view.SurfaceView.setKeepScreenOn()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(288)

本文整理了Java中android.view.SurfaceView.setKeepScreenOn()方法的一些代码示例,展示了SurfaceView.setKeepScreenOn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SurfaceView.setKeepScreenOn()方法的具体详情如下:
包路径:android.view.SurfaceView
类名称:SurfaceView
方法名:setKeepScreenOn

SurfaceView.setKeepScreenOn介绍

暂无

代码示例

代码示例来源:origin: hss01248/FaceDetect

private void initData() {
  svPreview.getHolder().addCallback(this);
  svPreview.setKeepScreenOn(true);
}

代码示例来源:origin: 18702953620/DouDemo

private void initView() {
  surfaceHolder = svRecord.getHolder();
  surfaceHolder.addCallback(this);
  //设置一些参数方便后面绘图
  svRecord.setFocusable(true);
  svRecord.setKeepScreenOn(true);
  svRecord.setFocusableInTouchMode(true);
  pbRecord.setMax(100);
  pbRecord.setProgress(0);
}

代码示例来源:origin: 18702953620/DouDemo

private void initView() {
  surfaceHolder = svRecord.getHolder();
  surfaceHolder.addCallback(this);
  //设置一些参数方便后面绘图
  svRecord.setFocusable(true);
  svRecord.setKeepScreenOn(true);
  svRecord.setFocusableInTouchMode(true);
  pbRecord.setMax(100);
  pbRecord.setProgress(0);
}

代码示例来源:origin: hss01248/FaceDetect

private void initData() {
  handleThread = new HandlerThread("dt");
  handleThread.start();
  detectHandler = new Handler(handleThread.getLooper());
  svPreview.getHolder().addCallback(this);
  svPreview.setKeepScreenOn(true);
  facedetecter = new FaceDetecter();
  facedetecter.init(this, Global.FACEPP_KEY);
  facedetecter.setTrackingMode(true);
}

代码示例来源:origin: hschott/Camdroid

private void initView(Context context) {
  Log.d(TAG, "initView()");
  this.setBackgroundColor(this.getResources().getColor(
      android.R.color.black));
  this.mSurfaceView = new SurfaceView(context);
  this.mSurfaceView.setKeepScreenOn(true);
  this.addView(this.mSurfaceView, 0);
  // Install a SurfaceHolder.Callback so we get notified when the
  // underlying surface is created and destroyed.
  SurfaceHolder holder = this.mSurfaceView.getHolder();
  holder.addCallback(this);
  this.setOnClickListener(this.onClickListener);
}

代码示例来源:origin: nglauber/dominando_android2

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  mSurfaceView = new SurfaceView(this);
  mSurfaceView.setKeepScreenOn(true);
  mSurfaceHolder = mSurfaceView.getHolder();
  mSurfaceHolder.addCallback(this);
  setContentView(mSurfaceView);
  mBolinha = new Bolinha(this);
  mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
}
protected void onResume() {

代码示例来源:origin: retomeier/Wrox-ProfessionalAndroid-4E

surfaceView.setKeepScreenOn(true);

代码示例来源:origin: stackoverflow.com

(SurfaceView)findViewById(R.id.surfaceView1);
surfaceView1.setKeepScreenOn(true);
    (SurfaceView)findViewById(R.id.surfaceView2);
surfaceView2.setKeepScreenOn(true);

代码示例来源:origin: stackoverflow.com

cameraPreview.setKeepScreenOn(true);

代码示例来源:origin: EasyDSS/EasyCamera

getResources().getDisplayMetrics().heightPixels);
surfaceView.setOnClickListener(this);
surfaceView.setKeepScreenOn(true);

相关文章