2014-09-29 68 views
2

我正在與Android Studio(0.8.6)進行比較。我想知道KeyMap在我的項目中設置註釋的格式。 我的意思是......我知道,「按Ctrl + Alt + L」格式化代碼,但它不格式化意見如下:如何在Android Studio中格式化通訊?

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

非常感謝

+1

在你要評論的行,按「先列註釋」'按Ctrl + /'切換註釋行和'按Ctrl + Shift + /'切換塊註釋 – kums 2014-09-29 10:04:27

+1

我需要格式化評論不添加.... – 2014-09-29 10:16:17

回答

1

嘗試這種方式設置/項目設置/代碼樣式/包裝。

+1

非常感謝!有用!設置 - >代碼樣式 - > Java - >環繞和大括號選項卡,並取消選中「第一列的註釋」 – 2014-09-29 14:25:33

0

試試這個..

CTRL+A, then Right click > Source > Format 

希望這會有所幫助。

4

我想幫助其他用戶解決以下(感謝@ Isura的支持)

文件圖像的問題 - >設置 - >代碼樣式 - >爪哇 - >包裝和標籤大括號和取消選中

enter image description here