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


Java TextureView.getLayoutParams方法代码示例

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


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

示例1: onCreate

import android.view.TextureView; //导入方法依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mCamMainPreview = (TextureView)findViewById(R.id.camera_main_preview);
    mCamMainPreview.setSurfaceTextureListener(mCamMainSurfaceTextureListener);

    mCamUsbPreview = (TextureView)findViewById(R.id.camera_usb_preview);
    mCamUsbPreview.setSurfaceTextureListener(mCamUsbSurfaceTextureListener);

    mCamMainPreviewLayoutParams = (FrameLayout.LayoutParams) mCamMainPreview.getLayoutParams();
    mCamUsbPreviewLayoutParams  = (FrameLayout.LayoutParams) mCamUsbPreview .getLayoutParams();

    mFlashView  = (View)findViewById(R.id.view_flash_overlay);
    mCamVideoUI = (RelativeLayout)findViewById(R.id.view_camera_videoui);
    mBtnGallery = (ImageView)findViewById(R.id.btn_dvr_gallery);
    mBtnSettings= (ImageView)findViewById(R.id.btn_dvr_settings);
    mBtnShutter = (ImageView)findViewById(R.id.btn_dvr_shutter);
    mBtnMuteSW  = (ImageView)findViewById(R.id.btn_recmic_mute_switcher);
    mBtnCameraSW= (ImageView)findViewById(R.id.btn_dvr_camera_switcher);
    mImpactLock = (ImageView)findViewById(R.id.ic_impact_lock);
    mTxtRecTime = (TextView )findViewById(R.id.text_recording_time);

    mCamVideoUI .setOnLongClickListener(this);
    mBtnGallery .setOnClickListener(this);
    mBtnSettings.setOnClickListener(this);
    mBtnShutter .setOnClickListener(this);
    mBtnMuteSW  .setOnClickListener(this);
    mBtnCameraSW.setOnClickListener(this);

    // start record service
    Intent i = new Intent(CameraActivity.this, RecordService.class);
    startService(i);

    // bind record service
    bindService(i, mRecServiceConn, Context.BIND_AUTO_CREATE);

    mAnimManager = new AnimationManager();

    // audo hide controls
    showUIControls(false);

    SystemProperties.set("sys.dvr.run.state", "1");
}
 
开发者ID:rockcarry,项目名称:CameraDVR,代码行数:48,代码来源:CameraActivity.java


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