当我使用onMeasure时:
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final int width = resolveSize(getSuggestedMinimumWidth(), widthMeasureSpec);
final int height = resolveSize(getSuggestedMinimumHeight(), heightMeasureSpec);
setMeasuredDimension(width, height);
if (mSupportedPreviewSizes != null) {
Camera.Parameters parameters = camera.getParameters();
mPreviewSize = getBestPreviewSize(width, height, parameters);
}
}
Android Studio告诉我" 无法解析方法" getSuggestedMinimumWidth(), getSuggestedMinimumHeight()和 setMeasuredDimension()
当然,我做了所有必要的导入。
有什么想法吗?