From 5ee8638a1b70162aeab6027e9ad5e79140dc5471 Mon Sep 17 00:00:00 2001 From: Dhaval Patel Date: Wed, 8 Jan 2020 23:50:13 +0530 Subject: [PATCH] Applied ktlint Applied ktlint code formatting --- .../kotlin/com/github/dhaval2404/imagepicker/ImagePicker.kt | 4 ++-- .../github/dhaval2404/imagepicker/provider/CameraProvider.kt | 2 +- .../dhaval2404/imagepicker/provider/CompressionProvider.kt | 2 +- .../github/dhaval2404/imagepicker/provider/CropProvider.kt | 2 +- .../com.github.dhaval2404.imagepicker/sample/MainActivity.kt | 4 ++-- .../com.github.dhaval2404.imagepicker/sample/util/FileUtil.kt | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/ImagePicker.kt b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/ImagePicker.kt index 2cee2d5a..b59a97b3 100644 --- a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/ImagePicker.kt +++ b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/ImagePicker.kt @@ -119,7 +119,7 @@ open class ImagePicker { * * If null, Image will be stored in {@see [Environment.DIRECTORY_DCIM]} */ - private var saveDir:String? = null + private var saveDir: String? = null /** * Call this while picking image for fragment. @@ -202,7 +202,7 @@ open class ImagePicker { return this } - fun saveDir(path:String): Builder { + fun saveDir(path: String): Builder { this.saveDir = path return this } diff --git a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CameraProvider.kt b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CameraProvider.kt index 763f5fa8..fb253b9d 100644 --- a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CameraProvider.kt +++ b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CameraProvider.kt @@ -63,7 +63,7 @@ class CameraProvider(activity: ImagePickerActivity) : BaseProvider(activity) { /** * Camera image will be stored in below file directory */ - private var mFileDir:File? = null + private var mFileDir: File? = null init { val bundle = activity.intent.extras!! diff --git a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CompressionProvider.kt b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CompressionProvider.kt index d256da77..afa6cbf2 100644 --- a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CompressionProvider.kt +++ b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CompressionProvider.kt @@ -28,7 +28,7 @@ class CompressionProvider(activity: ImagePickerActivity) : BaseProvider(activity private val mMaxFileSize: Long private var mOriginalFile: File? = null - private var mFileDir:File? = null + private var mFileDir: File? = null init { val bundle = activity.intent.extras!! diff --git a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CropProvider.kt b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CropProvider.kt index 0dbac05e..c4cf7131 100644 --- a/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CropProvider.kt +++ b/imagepicker/src/main/kotlin/com/github/dhaval2404/imagepicker/provider/CropProvider.kt @@ -39,7 +39,7 @@ class CropProvider(activity: ImagePickerActivity) : BaseProvider(activity) { private val mCropAspectX: Float private val mCropAspectY: Float private var mCropImageFile: File? = null - private var mFileDir:File? = null + private var mFileDir: File? = null init { val bundle = activity.intent.extras!! diff --git a/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/MainActivity.kt b/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/MainActivity.kt index 18b7b473..72097dd5 100644 --- a/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/MainActivity.kt +++ b/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/MainActivity.kt @@ -84,8 +84,8 @@ class MainActivity : AppCompatActivity() { // Image size will be less than 1024 KB .compress(1024) .saveDir(Environment.getExternalStorageDirectory()) - //.saveDir(Environment.getExternalStorageDirectory().absolutePath+File.separator+"ImagePicker") - //.saveDir(getExternalFilesDir(null)!!) + // .saveDir(Environment.getExternalStorageDirectory().absolutePath+File.separator+"ImagePicker") + // .saveDir(getExternalFilesDir(null)!!) .start(CAMERA_IMAGE_REQ_CODE) } diff --git a/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/util/FileUtil.kt b/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/util/FileUtil.kt index 54a970a2..6b7416d2 100644 --- a/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/util/FileUtil.kt +++ b/sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/util/FileUtil.kt @@ -3,7 +3,7 @@ package com.github.dhaval2404.imagepicker.sample.util import android.graphics.BitmapFactory import java.io.File import java.text.SimpleDateFormat -import java.util.* +import java.util.Locale /** * File Utility