Comparing files in Android Studio

Android Studio

Android Studio Problem Overview


If I have two different class/layout files in a project. Is there any way I can compare which lines are different using Android Studio?

Android Studio Solutions


Solution 1 - Android Studio

Select them both by selecting one, holding down ctrl (or command for mac) and clicking the second file, right-click, Compare Files.

enter image description here enter image description here

Solution 2 - Android Studio

Go to file name in project then press control then select Compare File and select another file you wish to compare.

Seperate window will open up showing differences by colour contrast.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNabinView Question on Stackoverflow
Solution 1 - Android StudiofweiglView Answer on Stackoverflow
Solution 2 - Android StudioSahil BansalView Answer on Stackoverflow