1.把目錄改成Project並且把camera-library.aar丟到libs資料夾
https://github.com/TroyRay/CameraView/tree/master/cameralib/libs
2.到Gradle(Module:app)加入
dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar'])
}
3.一般相機都會旋轉90度要把他轉回來
Matrix matrix = new Matrix();
matrix.setRotate(90.f);
bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
4.最終畫面