Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get to know about developer code blame in android studio

I am working on project which is shared by few developers, how to get to know about developer blame in android studio?? any shortcuts or any idea? which will help us to know about code blame.

like image 222
Vinod Pattanshetti Avatar asked Apr 03 '17 09:04

Vinod Pattanshetti


People also ask

How do I use annotations in Android?

To enable annotations in your project, add the support-annotations dependency to your library or app. Any annotations you add then get checked when you run a code inspection or lint task.

What is an annotation in Android?

Android Annotations is an annotation-driven framework that allows you to simplify the code in your applications and reduces the boilerplate of common patterns, such as setting click listeners, enforcing ui/background thread executions, etc.


2 Answers

Use Annotate feature of Android Studio

1.Right click in line number pane

enter image description here:

2.Select Annotate

enter image description here

like image 153
rcde0 Avatar answered Oct 19 '22 01:10

rcde0


In addition to rcde0's answer, which I use all the time. You can also add a keyboard shortcut to toggle this view.

  1. Preferences -> Keymap to bring up this screen: enter image description here

  2. Type "annotate" in the search area. This will find all commands that refer to the word in the search box.

  3. Click on Git->Git->Annotate, this will bring up the first popup, asking how to proceed.

  4. Select "Add Keyboard Shortcut" like I did here:

enter image description here

  1. Another modal window will pop up, asking you to type in a keyboard shortcut. Select the area I'm pointing to and simply type your keyboard shortcut. You can see that I typed ctrlA. I never use it to jump to the beginning of the line, so this works well for me. enter image description here

  2. If the keystroke is already defined, it will warn you. Feel free to try other keystrokes until you find one that suits your style without eliminating something that you use for other things. Click OK to reassign the keystroke.

  3. You'll now see your new keystroke mapped to the various "Annotate" functions. Hit 'OK' to exit preferences.

  4. Try it out. Type your newly-defined keystroke and see the Annotations in the left gutter toggle on and off.

like image 1
SMBiggs Avatar answered Oct 19 '22 01:10

SMBiggs