What is a tick sign in front of .xml file in android studio - android-studio

What is the tick symbol and how to remove it ?
Did I accidentally set something ?

Probably you pressed F11 or Ctr+F11. It is a simple book mark, like those in other browsers, used for later view, usage, etc.
Check this for other shortcuts link.

It's a bookmark feature in Android Studio. Useful, When you are working on most frequent files. Try pressing F3 to remove the bookmark or creating the bookmark. If F3, F11 or Ctrl+F11 is not working for you, go to the Android Studio Preference Settings -> Keymap and now search for the "bookmark". You will find the Toggle Bookmark option there and so is your respective hot key.

Related

I've accidentally added a number label in front of a file in Android Studio and I'm not sure how to get rid of it

I was trying to refactor a filename in Android Studio when I accidentally mistyped the keyboard shortcut.
Since I have a 75% keyboard, I don't have F rows. So I tried to hit Shift+FN+6, which would result in inputting Shift+F6, which is the keyboard shortcut for refactoring. But because of my typo, I hit some other keyboard command. Probably did <some keys> + 6 by accident.
Now there's a little 6 label listed in front of the filename:
Does anyone know what shortcut I accidentally hit, so I can undo it? I found an SO user who did the same thing as me but he got no replies. I tried hitting a bunch of random shortcuts and looking in the options menu but I can't find the option that I must've hit.
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
Android Studio is based on Idea and inherits its features.
I'm guessing this could be the numbered bookmarks feature. Try Shift-F11 to list all bookmarks or Ctrl-F11 to toggle it.

ReSharper Shift+Alt+L (go to open file) not working in 2015 with .resx?

I'm wondering if this is just my ReSharper setup, but as of updating to Visual Studio 2015 with ReSharper Ultimate 9.1.3, using the Shift+Alt+L shortcut while editing a .resx in the designer does nothing.
Has anybody else experienced this, and is there any config that will get this working or is it a bug?
Thanks
This was caused (for me anyway) because my keyboard mapping had magically changed back to UK mapping from US (I want US).
The other day I had another issue that caused Resharper key mappings to go awry and followed some advice on another post (I can't find it at the moment) that want along the lines of:
Open Tools > Options > Keyboard and hit Reset
Open Resharper > Options > Keyboard & Menus, select "Visual Studio" and hit "Apply Scheme"
This should wrest control from Resharper back to Visual Studio and give Resharper the freedom it needs to wrest control back from VS.. ugh, but it worked
Maybe have a look to Stackoverflow - How to locate a file in Solution Explorer in Visual Studio 2010?.
Tools (in Menu) -> Options -> Keyboard -> goto input Show commands containing and type SolutionExplorer.SyncWithActiveDocument. Goto Press Shortcut Keys and press Shift + Alt + L click on Assign button.
You may get a warning that the shortcut is already in use.

How to configure IntelliJ (also Android Studio) redo shortcut to CTRL+Y instead of CTRL+SHIFT+Z?

The default IntelliJ / Android Studio "Redo" action shortcut is CTRL+Shift+Z and this is a common problem for Windows users.
A bigger problem is CTRL+Y is mapped to the "Delete line" action - and this causes the undo stack to be lost.
To solve this issue, how can the "Redo" shortcut be changed to CTRL+Y in IntelliJ?
Open Settings (press CTRL+ALT+S)
Click Keymap on the left list.
There is a combobox that contains keymaps. Select one of them (default means IntelliJ of course. We can't change any of pre-defined keymap however we can copy, edit and then use the edited one. So) we should copy "default" to change only redo mapping.
Give a new name to your copied keymap.
Right click on:
Main Menu -> Edit -> Redo to click "Add Keyboard Shortcut"
Press CTRL+Y
Click OK
Click "Remove" to "the shortcut is already assigned to other actions. Do you want to remove other assignments?"
If you want to use any "remove line" shortcut also, then go to delete line shortcut and give to it any other shortcut (like 5th step)
Click OK to close settings window.
Change the keymap setting to the Visual Studio, Eclipse, or NetBeans preset.
The settings window can be found under File > Settings. CTRL+ALT+S should work if the shortcut hasn't been changed. In the settings window you should find Keymap under the Appearance & Behavior settings list.
You can configure each editor command to a key combo that you like (as #ismail yavuz mentioned) such as for Redo to CTRL+Y or you can just change the Keymap setting to an editor that you are used to. This might be best if you are in the process of switching to IntelliJ as it is probably the path of least resistance. The default settings for the Visual Studio, Eclipse, and NetBeans keymaps all map Redo to CTRL+Y.
The Principle of least astonishment is strangely violated for Windows users but at least shortcuts is customizable. Because of this command being so contrary to the Windows experience I decided it wasn't worth learning the IntelliJ keyboard when anywhere you're working at you need to, you can quickly change. There are almost no drawbacks to not learning the IntelliJ. Remember that in the keymap menu you can search for a command in the search box or click on the magnifying glass on the right to search by key combo.
Of course neither answer is wrong. Chose your preference.

shortcut in Android Studio to locate the current editing src file

Do you know how to check the location of current editing file in the project tree panel (the very left panel of the Android Studio), except manually. (The worst case is that all the folders there are collapsed)
The Navigate->Class shortcut can show me the src file in edit panel (central panel) quickly. Then I want to know the src file's logic location in project tree (left panel), so that I can add some new files in the same package quickly. (e.g. right-click the package and add new Class).
Currently, I have to expand the project tree and find it folder by folder.
Actually, in Xcode there is such a shortcut named "Reveal in Project Navigate"
What a convenient way it is.
I wonder whether this is also supported in Android studio.
Thanks
You can use the Scroll from Source button in the Project Toolbar in the left of Android Studio.
Another solution is Alt+F1+1. You can also read Locate current file in IntelliJ for more answers.
Just enable the following option!
In Android Studio 4 it is now Always Select Opened File under the Settings menu in the project view.
For automatic scrolling, you can do following:
You need to ensure Autoscroll to Source and Autoscroll from source is enabled.
Whenever you change the file the Project tree will be highlighted according.
I have observed some slowness and lag if project size is big(several modules or huge code base) and you use short cut Ctrl + N to navigate to a class.
So the alternative would be to either to click following icon:
OR
Use keyboard shortcut:
Alt + F1 + 1 or Alt + F1 + Enter
You can add shortcut (keymap) to "reveal current editing file in project explorer" command.
Press Ctrl + Alt + S, for Windows user, to open Settings
Select Keymap on the sidebar
Find the command using search box, type this into it: select in project view
Right click the result then select Add Keyboard Shortcut
Type any keyboard combination you want, for example, me prefer shortcut Ctrl + K to reveal current editing file on project explorer
Click OK button. It will prompt you to remove keyboard shortcut you typed from existing command, so just click Remove button.
I'm new to android development. I used to code in Sublime Text 3. One of first thing I do to make android development feels more enjoyable is binding all shortcut I used in Sublime Text 3 to Android Studio. Now, it feels like home :)
For Mac users: Option+fn+F1, then Enter.
Android Studio 3.6.3 (April 2020)
Go to Preferences > Keymap & search for "Select in Project View" and assign your keyboard shortcut.
Under options menu, select Auto scroll from Source
Navigate -> Select In.. -> Project View -> Project
open pref -> Keymap, then search 'select file in project view', not 'select opened file'.

Scroll from source keymap / go to file / locate file in project view

I've searched throu lots of articles but not found an answer, some has come up with workarounds but not really answered the question.
I want to locate a file in the project view over the files in Android Studio.
There is in the project view a button named scroll from source, this one does what I want. But I want it as a keyboard shortcut, like the command in Visual Studio many has as shift alt l. The resharper command is locate in solution explorer
There is also an option in the project view to mark always scroll from source.
These options are useful but do not solve my question.
One might think this would do it, but I don't want the project view over the files to scroll up and down all the time. I want a keyboard short cut because that is what feels fastest to me to work with and makes it more comfortable.
It's possible to achieve this by typing Alt + F1 followed by Enter. If you want to change that to one button press then your best bet is to record those commands as a macro.
To do this go to Edit > Macros > Start Macro Recording. Then press Alt + F1 followed by Enter. Then go to Edit > Macros > Stop Macro Recording and give your macro a name when prompted. Now that your macro is saved you can assign a key binding to it. Go into Settings > IDE Settings > Keymap > Macros and there you will find your macro which you can then bind.
It didn't seem to work for me unless it was a single keypress so I bound the macro to F10.

Resources