本文整理汇总了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");
}