protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_filter; mSelectedFilterTextView = (TextView)findViewById(R.id.selected_textview); findViewById(R.id.btn_select_image).OnClickListener = this; findViewById(R.id.btn_select_filter).OnClickListener = this; mBitmapButton = (Button)findViewById(R.id.btn_bitmap); mFileButton = (Button)findViewById(R.id.btn_file); mBitmapButton.OnClickListener = this; mFileButton.OnClickListener = this; mBitmapButton.Enabled = false; mFileButton.Enabled = false; mInputImageView = (ImageView)findViewById(R.id.input_image_view); mOutputImageView = (ImageView)findViewById(R.id.output_image_view); mSCamera = new SCamera(); try { mSCamera.initialize(this); } catch (SsdkUnsupportedException) { showAlertDialog("Fail to initialize SCamera.", true); return; } if (!mSCamera.isFeatureEnabled(SCamera.SCAMERA_FILTER)) { showAlertDialog("This device does not support SCamera Filter feature.", true); return; } // retrieving an {@link com.samsung.android.sdk.camera.filter.SCameraFilterManager} mSCameraFilterManager = mSCamera.SCameraFilterManager; // retrieving available filters mFilterInfoList = mSCameraFilterManager.AvailableFilters; if (mFilterInfoList.Count > 0) { mSelectedFilterTextView.Text = mFilterInfoList[0].Name; } }
/// <summary> /// Prepares an UI, like button, dialog, etc. and /// </summary> protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_ipx; Log.v(TAG, "onCreate"); mInputView = (ImageView)findViewById(R.id.image_in); mOutputView = (ImageView)findViewById(R.id.image_out); // Get screen width. DisplayMetrics dm = new DisplayMetrics(); WindowManager.DefaultDisplay.getMetrics(dm); mScreenWidth = dm.widthPixels; mScreenHeight = dm.heightPixels; // initialize SCamera mScamera = new SCamera(); try { mScamera.initialize(this); } catch (SsdkUnsupportedException) { showAlertDialog("Fail to initialize SCamera.", true); return; } if (!mScamera.isFeatureEnabled(SCamera.SCAMERA_IMAGE)) { showAlertDialog("This device does not support SCamera Image Processing Accelerator feature.", true); return; } Log.v(TAG, "SDK feature check passed"); // initialize Gellery button ImageView openGalleryButton = (ImageView)findViewById(R.id.button1); openGalleryButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); makeBufferWithDefaultPath(); }
/// <summary> /// Prepares an UI, like button, dialog, etc. and /// </summary> protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_ipx; Log.v(TAG, "onCreate"); mInputView = (ImageView)findViewById(R.id.image_in); mOutputView = (ImageView)findViewById(R.id.image_out); // Get screen width. DisplayMetrics dm = new DisplayMetrics(); WindowManager.DefaultDisplay.getMetrics(dm); mScreenWidth = dm.widthPixels; mScreenHeight = dm.heightPixels; // initialize SCamera mScamera = new SCamera(); try { mScamera.initialize(this); } catch (SsdkUnsupportedException) { showAlertDialog("Fail to initialize SCamera.", true); return; } if (!mScamera.isFeatureEnabled(SCamera.SCAMERA_IMAGE)) { showAlertDialog("This device does not support SCamera Image Processing Accelerator feature.", true); return; } Log.v(TAG, "SDK feature check passed"); // initialize Gellery button ImageView openGalleryButton = (ImageView) findViewById(R.id.button1); openGalleryButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); makeBufferWithDefaultPath(); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_filter; mSelectedFilterTextView = (TextView) findViewById(R.id.selected_textview); findViewById(R.id.btn_select_image).OnClickListener = this; findViewById(R.id.btn_select_filter).OnClickListener = this; mBitmapButton = (Button) findViewById(R.id.btn_bitmap); mFileButton = (Button) findViewById(R.id.btn_file); mBitmapButton.OnClickListener = this; mFileButton.OnClickListener = this; mBitmapButton.Enabled = false; mFileButton.Enabled = false; mInputImageView = (ImageView) findViewById(R.id.input_image_view); mOutputImageView = (ImageView) findViewById(R.id.output_image_view); mSCamera = new SCamera(); try { mSCamera.initialize(this); } catch (SsdkUnsupportedException) { showAlertDialog("Fail to initialize SCamera.", true); return; } if (!mSCamera.isFeatureEnabled(SCamera.SCAMERA_FILTER)) { showAlertDialog("This device does not support SCamera Filter feature.", true); return; } // retrieving an {@link com.samsung.android.sdk.camera.filter.SCameraFilterManager} mSCameraFilterManager = mSCamera.SCameraFilterManager; // retrieving available filters mFilterInfoList = mSCameraFilterManager.AvailableFilters; if (mFilterInfoList.Count > 0) { mSelectedFilterTextView.Text = mFilterInfoList[0].Name; } }