當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。