Tabnine Logo
SurfaceView.getWidth
Code IndexAdd Tabnine to your IDE (free)

How to use
getWidth
method
in
android.view.SurfaceView

Best Java code snippets using android.view.SurfaceView.getWidth (Showing top 7 results out of 315)

origin: Bilibili/DanmakuFlameMaster

@Override
public int getViewWidth() {
  return super.getWidth();
}
origin: stackoverflow.com

 //The following two are just for viewing sake, they should be defined somewhere
SurfaceView targetSurfaceView;
Bitmap mySourceBitmap;

Bitmap scaledBitmap = Bitmap.createScaledBitmap(mySourceBitmap, 
           targetSurfaceView.getWidth(), 
           targetSurfaceView.getHeight(), 
           true);
origin: harjot-oberai/AndroidDigitClassifier

private Rect calculateFocusArea(float x, float y) {
  int left = clamp(Float.valueOf((x / preview.getWidth()) * 2000 - 1000).intValue(), FOCUS_AREA_SIZE);
  int top = clamp(Float.valueOf((y / preview.getHeight()) * 2000 - 1000).intValue(), FOCUS_AREA_SIZE);
  return new Rect(left, top, left + FOCUS_AREA_SIZE, top + FOCUS_AREA_SIZE);
}
origin: googlesamples/android-ScreenCapture

private void setUpVirtualDisplay() {
  Log.i(TAG, "Setting up a VirtualDisplay: " +
      mSurfaceView.getWidth() + "x" + mSurfaceView.getHeight() +
      " (" + mScreenDensity + ")");
  mVirtualDisplay = mMediaProjection.createVirtualDisplay("ScreenCapture",
      mSurfaceView.getWidth(), mSurfaceView.getHeight(), mScreenDensity,
      DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
      mSurface, null, null);
  mButtonToggle.setText(R.string.stop);
}
origin: werbhelius/MediaUtils

List<Camera.Size> mSupportedVideoSizes = parameters.getSupportedVideoSizes();
Camera.Size optimalSize = CameraHelper.getOptimalVideoSize(mSupportedVideoSizes,
    mSupportedPreviewSizes, mSurfaceView.getWidth(), mSurfaceView.getHeight());
origin: purrprogramming/voice-pitch-analyzer

    this.gradient.getWidth(),
    this.gradient.getBottom() - (float) ((PitchCalculator.maxFemalePitch - PitchCalculator.minPitch) * pxPerHz),
canvas.drawText(getResources().getString(R.string.female_range), this.gradient.getWidth() - 10, this.gradient.getHeight() - (float)
    ((PitchCalculator.maxFemalePitch - PitchCalculator.minPitch) * pxPerHz) + 20*dm.density, textPaint);
canvas.drawRect(0,
    this.gradient.getHeight() - (float) ((PitchCalculator.minMalePitch - PitchCalculator.minPitch) * pxPerHz),
    this.gradient.getWidth(),
    this.gradient.getHeight() - (float) ((PitchCalculator.maxMalePitch - PitchCalculator.minPitch) * pxPerHz),
canvas.drawText(getResources().getString(R.string.male_range), this.gradient.getWidth() - 10, this.gradient.getHeight() - (float)
    ((PitchCalculator.maxMalePitch - PitchCalculator.minPitch -
        (PitchCalculator.maxMalePitch - PitchCalculator.minFemalePitch)) * pxPerHz) + 150*dm.density, textPaint);
canvas.drawText(getResources().getString(R.string.androgynous_range), this.gradient.getWidth() - 10, this.gradient.getHeight() - (float)
    ((PitchCalculator.maxMalePitch - PitchCalculator.minPitch) * pxPerHz) + 22*dm.density, textPaint);
origin: pedroSG94/vlc-example-streamplayer

 width = surfaceView.getWidth();
 height = surfaceView.getHeight();
} else if (textureView != null) {
android.viewSurfaceViewgetWidth

Popular methods of SurfaceView

  • getHolder
  • <init>
  • onMeasure
  • onInitializeAccessibilityEvent
  • onInitializeAccessibilityNodeInfo
  • setLayoutParams
  • onKeyDown
  • setOnTouchListener
  • onDetachedFromWindow
  • setVisibility
  • getLayoutParams
  • onAttachedToWindow
  • getLayoutParams,
  • onAttachedToWindow,
  • onTouchEvent,
  • onSizeChanged,
  • setOnClickListener,
  • getHeight,
  • setKeepScreenOn,
  • onLayout,
  • setZOrderOnTop

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now