Skip to main content
added 47 characters in body
Source Link

Here for commenting we have to write like below:

<!-- Your comment here --> 

Shortcuts for IntelliJ Idea and Eclipse

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag. For Example:

<!--<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Hello.." android:textStyle="bold" />--> 

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag. For Example:

<!--<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Hello.." android:textStyle="bold" />--> 

Here for commenting we have to write like below:

<!-- Your comment here --> 

Shortcuts for IntelliJ Idea and Eclipse

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag. For Example:

<!--<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Hello.." android:textStyle="bold" />--> 
added 197 characters in body
Source Link
Avijit Karmakar
  • 9.5k
  • 6
  • 48
  • 61

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag. For Example:

<!--<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Hello.." android:textStyle="bold" />--> 

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag.

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag. For Example:

<!--<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Hello.." android:textStyle="bold" />--> 
added 171 characters in body
Source Link
Avijit Karmakar
  • 9.5k
  • 6
  • 48
  • 61

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag.

Here for commenting we have to write like below:

<!-- Your comment here --> 

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag.

Here for commenting we have to write like below:

<!-- Your comment here --> 

For Windows & Linux:

Shortcut for Commenting a single line:

Ctrl + /

Shortcut for Commenting multiple lines:

Ctrl + Shift + /

For Mac:

Shortcut for Commenting a single line:

cmnd + /

Shortcut for Commenting multiple lines:

cmnd + Shift + /

One thing you have to keep in mind that, you can't comment an attribute of an XML tag. For Example:

<TextView android:layout_width="match_parent" android:layout_height="wrap_content" <!--android:text="Hello.."--> android:textStyle="bold" /> 

Here, TextView is a XML Tag and text is an attribute of that tag. You can't comment attributes of an XML Tag. You have to comment the full XML Tag.

added 442 characters in body
Source Link
Avijit Karmakar
  • 9.5k
  • 6
  • 48
  • 61
Loading
added 127 characters in body
Source Link
Avijit Karmakar
  • 9.5k
  • 6
  • 48
  • 61
Loading
Source Link
Avijit Karmakar
  • 9.5k
  • 6
  • 48
  • 61
Loading