Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are some Android Studio classes highlighted with different colors?

I did notice some classes are highlighted in blue in my project structure. What is the reason?

enter image description here

like image 357
VSB Avatar asked Oct 23 '18 13:10

VSB


People also ask

Why are my Android Studio files red?

It is because Version Control(like Git) have been enable in your project. Go to File -> Settings -> Editor . Under Version Control select File Status Colors . It contains list of different colors and what they mean.

What is color in Android Studio?

Color instances are a representation introduced in Android O to store colors in different color spaces , with more precision than both color ints and color longs.


2 Answers

To expand on tyczj's answer, if version control is being used on the project then file names may be highlighted in different colours in the file explorer, editor tabs and active changes tab:

  • White - No changes to the file since the last commit
  • Blue - File exists in version control and has been modified since the last commit
  • Green - File does not exist in version control and has been staged for the next commit
  • Red - File does not exist in version control and has not been staged for the next commit
  • Yellow - File has been moved from its previous location in version control, but its contents have not been modified
  • Grey (only in Active Changes tab) - File has been deleted locally but not in version control

So in your example you have two modified files that already exist in version control.


As Zoe points out, this reflects the default colour scheme in Android Studio and IntelliJ. These colours may be modified via Settings -> Editor -> Color scheme -> VCS

like image 132
Michael Dodd Avatar answered Sep 18 '22 08:09

Michael Dodd


Because you are using version control and you have uncommitted changes for those files

like image 39
tyczj Avatar answered Sep 19 '22 08:09

tyczj