alfo888_ibg
alfo888_ibg

Reputation: 1857

How to format comments in Android Studio?

I am strating with Android studio (0.8.6) . I would like to know the KeyMap to format the comments in my project. I mean... I know "Ctrl+Alt+L" to format code but it doesn't format the comments as below:

   int notificationId = 005;
//Issue the notification
   NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);

Thanks a lot

Upvotes: 4

Views: 2130

Answers (3)

alfo888_ibg
alfo888_ibg

Reputation: 1857

I want to help another user to solve the problem with the image below (thanks to @Isura's support)

File--> Settings-->Code Style-->Java --> Wrapping and Braces tab and uncheck "Comment at first column"

enter image description here

Upvotes: 4

Sudheesh Mohan
Sudheesh Mohan

Reputation: 2769

Try this..

CTRL+A, then Right click > Source > Format 

Hope this will help.

Upvotes: 0

Isura Amarasinghe
Isura Amarasinghe

Reputation: 932

Try this way Settings / Project Settings / Code Style / Wrapping.

Upvotes: 2

Related Questions