Remove newline after comma on function calls in Android Studio - android-studio

When I selected my codes to indent it using CTRL+ALT+L, my Android Studio seems to always add a new line after each comma. How do I avoid this?
Here's what currently is happening
and here's how I need it to be
I have tried almost every things under Settings > Editor > Code Style > Kotlin, but I still couldn't get Android Studio not to add these new lines after comma

Related

flutter code formatting in vscode like in Android studio

In Android Studio when you have Column of widgets it is very convenient to collapse the code like :
But in VSCode you cannot see the if there is a coma in the end, and even add it in collapsed mode.
Can VSCode be configured to show the closing brace and comma for folded code on the folded line, similar to Android Studio?

How I can move wrap line of the code in Android studio?

How I can move to left or right this wrap line? I am using Android Studio 3.6.1.
The problem is that if I have long text and I use Reformat Code with dartfmt the code move to the next line because of that line and is hardly readable in the flutter app at least to me.
I've found the solution in Android Studio / Preferences / Editor / Code Style / Dart: (it was 80 by default)

How to enable word-wrap for editor in Android Studio on MacOS

Recently the Android Studio 3.5 updates and now Android Studio 3.6, the editor window does not wrap the text so some lines are long and go off the right of the screen. I don't want to scroll left and right all the time, so would like the text to autowrap. I've read many posts on the issue but nothings has solved it.
I've tried going to
Preferences -> Editor -> General and enabling soft wraps there, but that hasn't helped.
I tried adding *.java to the soft wraps files but that didn't help.
The only thing that works is selecting View -> Active Editor - Soft Wrap. That formats the current editing window with auto wrap, but each time I open a new java file auto wrap is not enabled I would need to enable it again. This is so frustrating and was never an issue before Android Studio 3.5. Any help would be appreciated.
I had the same problem, and my solution should work for you. The delimiter in the soft-wrap file list is a semicolon, not a comma: change your comma to a semicolon.

How to configure Android Studio settings for parsing JSON files?

I am using libgdx skins in a project. Libgdx skins don't use double quotes for keys and values. Android studio shows errors while parsing the skin.json file.
Is there a way to configure Android Studio to ignore the "double quote" check while inspecting a JSON file?
Edit - I want Android Studio to parse the keys and values and the entire file as it normally would, had the "double quotes" been there. That helps in editing the file.
I used Android Studio's Edit->Find->Replace with Regex selected to add double-quotes in my copy:
Find className:
^(([A-Za-z0-9\\$]*\.)*[A-Za-z0-9\\$]*)(:)
Replace className:
"$1"$3
Find everything else:
([ \t])([A-Za-z]([A-Za-z]*[\.-])*[A-Za-z\.]*)([,:\s])
Replace everything else:
$1"$2"$4

Android studio comment shortcuts

When I hit the shortcut command in Android Studio that comments out a line of code the two slashes go to the begging of the line, leaving empty space in front of the line. Is it possible to align the the two slashes just before the beginning of the code?
//I want to achieve this
// this happens by default
Go to Settings > Editor > Code Style > Java. Then select the Code Generation tab and uncheck the Line comment at first column checkbox.
File-> settings->Editor->java-> Code generation->
under comment code section uncheck the Line comment at first column

Resources