Make Android Studio autopop up not change constrast - android-studio

In Android Studio, pressing the up an down arrows will change the contrast of the autopopup bar.
Before
After
This also occurs in the default themes. Is there anyway to make the contrast start in the after position, even without pressing any arrows?

The popup is dimmed to indicate that there is no default selection for completion. It depends on context and in some cases the first entry will be selected automatically, while in the other cases you need to select the completion varian with the arrow keys first.
To get the pre-selection work automatically in IntelliJ IDEA and Android Studio enable the Insert selected suggestion by pressing space, dot, or other context-dependent keys option:
In some other cases it may be also necessary to add
-Dide.completion.lookup.element.preselect.depends.on.context=false
in Help | Edit Custom VM Options and restart the IDE.
Related issue: https://youtrack.jetbrains.com/issue/IDEA-193090.

Related

Code snippet floating in mid-air as a tooltip, cannot hide it, after extracting method [IntelliJ Idea / Android Studio]

Trying to perform the Ctrl + G (Go to line) keyboard shortcut, seems I accidentally activated a feature that pins the code the cursor was previously on.
After closing and reopening the file, things are worse; the code snippets still are floating over the screen, no matter if I move the Android Studio window.
I have searched keyboard shortcuts using this guide, but no luck.
Is there a way to disable or revert this?
Noticed by comment below and confirmed by myself: This happens after extracting a method.
I have been able to get rid of those permanent tooltips by invalidating caches and restart, but this should not be the way to disable them, as I still don't know which is the keyboard shortcut to toggle this "pin snippet" function.

How to enable soft wraps in android studio?

I need help in configuring Android Studio so that the code that I write does not go beyond the window and I don't have to scroll horizontally to see it? (The code should go to the next line while still in continuation)
This is what I mean to say ...
I have seen a question similar to this on the site but the wrapping and braces setting were not present for Flutter (there was no option for flutter) or Dart (there's nothing there except for dartfmt).
"File>Settings>Editor>General" tab and under soft wrap section check softwrap option and click on apply
if you want arrow indicators then uncheck the option "show soft wrap indicators for current line only" then click on apply.

Can't activate shortcut on intellij products

Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.

Android Studio autocomplete on special character (space, period, etc.) like in Visual Studio

Is it possible to enable autocompletion of the selected suggestion when entering special characters like in Visual Studio?
For example:
When typing 'MenuI' Android Studio suggests 'MenuInflater' that I can autocomplete by hitting TAB after which I type SPACE to separate my variable name.
In Visual Studio I can type SPACE directly (instead of TAB) to get the autocompletion plus my space character. This works for other special characters like period, brackets and so on, too.
Yes, I have also faced the same issue in Android studio. And finally I found it here.
Open the Android Studio settings go to Editor --> General --> Code Completion
and check the option "Insert selected variant by typing dot, space, etc."
And uncheck the options "Basic completion (Ctrl+Space)" and "Smart Type Completion (Ctrl+Shift+Space)"
Check this Android studio settings image
Well, this is implemented, slightly.
If you have MenuInflater and type in MenuI, and then CTRL+SPACE, which means you tell the IDE that you want to use the autocomplete dropdown, and then press space, it works as you wish.
So, I could type in MenuIn, then I could either press the down key, or use CTRL+SPACE ("MenuInflater" Should now be highlighted in blue:
), and then press space, and it'll work as you wish.
I suck at explaining, so if you don't get it, I'll try more.

Visual Studio: Undo-redo of replace-action does not scroll editor window

I did some find-and-replace actions in my C++ code with visual studio:
only single find-and-replace actions (did not use “replace all”)
only one file affected (did not change multiple files at the same time)
thus, a very simple case!
Then I wanted to undo these changes. So I pressed ctrl-Z one time. This had the desired effect. The latest change (which was still visible in the current screen) was undone.
But I also wanted to undo the remaining changes. These changes where currently not visible on the screen. So I expected the editor to scroll there when pressing ctrl-Z.
But unfortunately the editor did not scroll to the position of the undo when I pressed ctrl-z.
The undo worked, however. I checked by scrolling to the position manually.
Then I tried it with redo. Same result: Redo worked, but the editor did not scroll to the position of the redo.
Finally I tried if this also happens when I undo-redo other types of changes (not made by the “find and replace” functionality).
Result: Undo-Redo worked correctly and also scrolled correctly!
Thus: It seems only changes by the “find and replace” functionality are affected by this problem.
Did you also have this problem and found a solution?
Please help me!
Regards Gerhard
I am having the same thing happen in Visual Studio Ultimate 2012 (Version 11.0.60610.01 Update 3).
It might sound like it's not that important, but it is really hurting the usability of this otherwise great IDE!
PS I've been using VS since the 90s, I still haven't found anything better. I wish MS would put macros back into VS, even if it's VBA (or Python)

Resources