小编Sir*_*rad的帖子

前置摄像头预览不是全屏

我使用camera2 api在android上制作了一个自定义相机.我目前面临着一个设备OnePlus One的间歇性问题.经过检查,它可以与其他设备一起使用,如S3,S4,HTC(所有主要设备),Moto(所有设备).

如果在OnePlus One和其他设备上解决此问题,是否需要特别需要?

public class AutoFitTextureView extends TextureView {

private int mRatioWidth = 0;
private int mRatioHeight = 0;

public AutoFitTextureView(Context context) {
    this(context, null);
}

public AutoFitTextureView(Context context, AttributeSet attrs) {
    this(context, attrs, 0);
}

@SuppressLint("NewApi")
public AutoFitTextureView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
}

/**
 * Sets the aspect ratio for this view. The size of the view will be measured based on the ratio
 * calculated from the parameters. Note that the …
Run Code Online (Sandbox Code Playgroud)

camera android

1
推荐指数
1
解决办法
1075
查看次数

标签 统计

android ×1

camera ×1