Home > Mobile >  Auto code format does not keep line break
Auto code format does not keep line break

Time:01-11

Recently I just updated my android studio. I noticed that when I try to format my code, it ended up like the image below? ImageFormat Can we make it like this instead:

openCameraObservable
            .debounce(200, TimeUnit.MILLISECONDS)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe({}, {})

CodePudding user response:

Settings -> Editor -> Code Style -> Kotlin -> Wrapping and Braces -> Chained Function Calls

Set it to "Wrap if long" or "Wrap always"

  • Related