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