Java Code Examples for android.graphics.PixelFormat#UNKNOWN

The following examples show how to use android.graphics.PixelFormat#UNKNOWN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CameraSurfacePreview.java    From cordova-plugin-camerapicturebackground with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("deprecation")
private static void takePhoto(final Context context) {
	
	final SurfaceView preview = new SurfaceView(context);
	SurfaceHolder holder = preview.getHolder();
	// deprecated setting, but required on Android versions prior to 3.0
	holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

	holder.addCallback(surfaceCallback);

	WindowManager wm = (WindowManager) context
			.getSystemService(Context.WINDOW_SERVICE);
	WindowManager.LayoutParams params = new WindowManager.LayoutParams(1,
			1, // Must be at least 1x1
			WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, 0,
			// Don't know if this is a safe default
			PixelFormat.UNKNOWN);

	// Don't set the preview visibility to GONE or INVISIBLE
	wm.addView(preview, params);
}
 
Example 2
Source File: ForwardingDrawable.java    From fresco with MIT License 5 votes vote down vote up
@Override
public int getOpacity() {
  if (mCurrentDelegate == null) {
    return PixelFormat.UNKNOWN;
  }

  return mCurrentDelegate.getOpacity();
}
 
Example 3
Source File: CompositorSurfaceManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
public SurfaceState(Context context, int format, SurfaceHolder.Callback2 callback) {
    surfaceView = new SurfaceView(context);
    surfaceView.setZOrderMediaOverlay(true);
    surfaceView.setVisibility(View.INVISIBLE);
    surfaceHolder().setFormat(format);
    surfaceHolder().addCallback(callback);

    // Set this to UNKNOWN until we get a format back.
    this.format = PixelFormat.UNKNOWN;
}
 
Example 4
Source File: WrapDrawable.java    From Nimingban with Apache License 2.0 5 votes vote down vote up
@Override
public int getOpacity() {
    if (mDrawable != null) {
        return mDrawable.getOpacity();
    } else {
        return PixelFormat.UNKNOWN;
    }
}
 
Example 5
Source File: LayerDrawable.java    From RippleDrawable with MIT License 5 votes vote down vote up
@Override
public int getOpacity() {
    if (mOpacityOverride != PixelFormat.UNKNOWN) {
        return mOpacityOverride;
    }
    return mLayerState.getOpacity();
}
 
Example 6
Source File: WrapDrawable.java    From EhViewer with Apache License 2.0 5 votes vote down vote up
@Override
public int getOpacity() {
    if (mDrawable != null) {
        return mDrawable.getOpacity();
    } else {
        return PixelFormat.UNKNOWN;
    }
}
 
Example 7
Source File: AnimationDrawableWrapper.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    if (mDrawable == null)
        return PixelFormat.UNKNOWN;
    return mDrawable.getOpacity();
}
 
Example 8
Source File: BadgeDrawable.java    From AndroPress with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 9
Source File: DrawableWrapper.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    if (mDrawable == null)
        return PixelFormat.UNKNOWN;
    return mDrawable.getOpacity();
}
 
Example 10
Source File: GoogleCompatEmojiDrawable.java    From Emoji with Apache License 2.0 4 votes vote down vote up
@Override public int getOpacity() {
  return PixelFormat.UNKNOWN;
}
 
Example 11
Source File: TestDrawable.java    From Badger with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 12
Source File: PullForegroundDrawable.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 13
Source File: MaterialHookDrawable.java    From PicKing with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 14
Source File: MultiDrawable.java    From android-maps-utils with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 15
Source File: RevealDrawable.java    From ChangeTabLayout with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 16
Source File: BadgedFourThreeImageView.java    From Protein with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 17
Source File: BadgeDrawable.java    From XERUNG with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 18
Source File: BadgeDrawable.java    From XERUNG with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 19
Source File: WaterMarkBg.java    From watermark-android with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}
 
Example 20
Source File: MyDrawLogo.java    From kAndroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getOpacity() {
    return PixelFormat.UNKNOWN;
}