Is there a way to enable interactive search in properties window? - android-studio

I just started to use Android Studio and wondering if there is a way to search interactively in property window.
I mean like Xcode does. (It's not a properties, though.)
Is there a plugin or configuration for the function like this?

Android Studio actually has a search tool for properties similar to the one in Xcode. But it's implemented in a very unusual and un-intuitive way. Which makes it hard to find.
In Android Studio version 1.5.1, you have to click either on the 'Properties' header or any property-name below the header, and then you need to start typing the property you want, even though there is no text-box or any other indication that your typing will produce any effect.
When you do this, then a text-box appears with the characters you've typed in. And Android Studio highlights all the properties that contain your character sequence. You can then look only at the highlighted properties to find the one you want.

There is no filter like in Xcode, but if you start typing property name the selection will jump to the first match and the rest of the matches will be highlighted.

Related

Flutter smart-code generation shortcut in android studio

when I select a widget say a Text widget in android studio, I hit on alt and enter to generate a code. For example, you can wrap a widget inside a column with this combination but in my case, this combination suggests me things like : generate getter and setter or toString() method which definitely come from java. Now you might say, you have to change your key binding then but that is the problem, on keyboard shortcuts section, I see only one section where I can assign a combination. But then this happens where I only get code suggestions for java. How could I possibly change that?
Alright, so I found the solution, when you check the keyboard shortcuts, you gotta find show context actions and assign a key binding to it, then it is fixed.

Search-Everywhere in Android Studio (IntelliJ) makes Search File redundant?

In Android Studio (and IntelliJ), shift-shift is used to Search File (and Everywhere, e.g. class name etc).
I just realize it also have shift-command-O that search for a file.
With shift-shift, it seems to me shift-command-O is redundant.
So I'm checking to see if I have miss something that is in shift-command-O but not in shift-shift?
Shift-Shift shows a popup with occurrences of the string you've entered in names of files, classes, symbols and actions. Shift-Command-O shows a popup with occurrences of the same string only in names of files. Same task, same UI (in recent IJ/AS versions) more narrow filter.
Well you're almost right but there is one main difference in those two commands.
Shift shift will search for a file.
While shift-command-o will go to the specified file.
I guess in a way they to de same, but if you use Shift-command-o you will be redirected to that file and saves you one click.
But feel free to use what you want, shortcuts are for convenience so you should use what is most comfortable.
Here is a link with all shortcuts in IntelliJ IDEA, could be usefull in the future :)
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf

Make Android Studio autopop up not change constrast

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.

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.

Exclude files from Android Studio lint spell checker

The Android Studio lint spell checker flags hex codes that look to it like words in certain files that would be better off unchecked, such as values/colors.xml and build/intermediates/dex-cache/cache.xml.
How do I tell lint to not spell check certain folders or files?
This can be done by using IDE scopes. In Android Studio (at least 3.4) you can configure each inspection per scope. The idea is that you create a scope that contains all files you don't want to be spellchecked, and then switch Spelling inspection off for this scope, but keep it on for everything else.
Add a new scope in Settings / Appearance & Behavior / Scopes that contains all files which you want to exclude from spell checking. For example, this pattern covers all svg files: file:*.svg. In your case it could be like file:*/colors.xml||file:*/cache.xml. IDE will highlight all affected files by green, so you can check if you entered correct pattern.
Then set up Spelling inspection, so that it is OFF for your new scope and ON everywhere else.
Had the same problem with colors.xml
I couldn't find a way to disable the check for a certain file, but I could get rid of the spellcheck on the hex codes.
Click Analyze->Inspect Code.
Choose Whole Project and click OK.
The inspection tool window will open with the results.
You should be able to see the problematic hex codes under Spelling->typo.
Right click any one of them and choose Exclude.
Did the trick for me. HTH

Resources