how to get list of colors in android studio for mac? (ctrl q on windows) - android-studio

Coding dart In android studios when you write colors: Colors. choose a color and then press ctrl q on windows you get a list of colors with corresponding numbers you can choose from like:
colors: Colors.deepOrangeAccent[200] for example. How to I get that list on a mac? No shortcut seems to work for me.

Just click on three dots and open up quick documentation or press F1 button after typing Colors.

So, you actually just have to do e.g purple.shade100
There is no shortcut I believe for mac, but you can do . and it'll pull up options

Related

Flutter is not showing me the suggestion window for color names/numbers in Android Studio

I'd like to be able to see a suggestion that will allow me to see what colour belongs to which colour name/number when using Android studio.
Please note that "Show quick documentation on mouse move" has been activated in my Android studio general settings.
This is what my screen looks like when my mouse is on "blueGrey"
This is how i'd like my screen to look like when my mouse is on "blueGrey"
I sometimes have the same issue. For me, when I open the Quick Documentation with CTRL Q (Command J on Mac), then it shows the color swatches like on your second picture.

Android Studio uses the first keyboard layout for shortcuts hotkeys

I have multiple keyboard layouts defined for my OS. Two of them are English Querty and Dvorak. The problem that I have is that the shortcut keys of Android Studio, always work with the first layout, even if the second one is active. All other applications honor the selected layout and don't have this problem.
For example, I have selected the second layout which is Dvorak:
Now in Android Studio I enter Ctrl + Z to undo something. But the shortcut for Ctrl + / gets triggered because Z in Dvorak is defined in the key / in Querty.
Is there a way to fix this problem?
P.S: I'm using Ubuntu 19.04.
Hi you are right Go to Ubuntu settings / Keyboard drag and drop what you want to use which keyboard layout to first row. it is done.

Android Studio where is color picker for Flutter plugin

In Android Studio, we have color picker when developing in Java/Kotlin (natively) like this.
But while developing for Flutter, I can't see any options to pick my own color. Is there some plugin required to do that?
The color picker is not clickable in Android Studio running Flutter( Dart code), see picture below. But i found a work around using the Color class and manually opening color picker. Then pick a color and copy/paste it like this:
Here is how i do it:
1. Double tap shift to run search
2. Type Color or Picker
3. Open Color Picker from the search list
4. Copy/paste the HEX color code into your color class.
Expert tip:
Add color picker to a keyboard shortcut. You can find the settings for Keymap, under File > Settings > Keymap
You must have heard of the materials.io website from google, which provides many materials like designs, icons, tools, resources and components for easy developing. Now Color Tool is also available. You must add the website to your browsers shortcut if you are a developer. Here's the link for chosing color : https://www.material.io/resources/color/#!/?view.left=0&view.right=0&primary.color=E91E63
Another way I found is :
Type 'Colors.' and press control+space to see the available colors.
Select the color using arrow or mouse.
Press control+Q for the quick documentation.
And on the documentation windows, click on the edit button which opens the
'colors.dart' file.
Here all the colors with all shades are available. These shortcuts are for windows.
Once you open the file, you can always come back here to chose the next shade. But will not be the comfortable method like android project.
Hope a easier way to do this will come with the later update.

How to copy error message in Android Studio tooltip

How can you select or copy the error tooltips that appear when hovering over code in Android Studio?
For example:
Is there a key command? I'm on Mac if that's relevant.
Thanks!
On Windows: try,
Hover over the yellow popup text
Alt+LeftMouseClick
The 'yellow text' should now be on your clipboard, ready to paste.
That is it!
The older solutions don't seem to be working for me. Not sure if the behavior changed, but here is what is working for me on a Mac with Android Studio 3.4:
press control + option simultaneously
hover over the text that has an error
click on the tooltip when it pops up.
On Mac, a slightly different dance than Windows.
hold shift
click and hold towards the end of the text(probably missing last character)
keep holding mouse click and release shift
while holding mouse click, press Command + C to copy
paste wherever
Ubuntu:
When you make the popup shows up, hold Alt+Shift and carefully select any amount of the text and press Ctrl+C.
You don't need to select all of the text, because it will always copy the whole message ignoring the selection.
Tested on Ubuntu 18.04.3 LTS and Android Studio 3.5.2.
Once popup shows up, move your mouse pointer over it and simply select (mark) bubble's text, then do Copy with keyboard shortcut (CTRL+C on Windows or Command+C on Mac) while still having mouse pointer over the bubble.
Not sure how on Mac, but on Windows it works that way for me, with the exception that you need to keep mouse pointer over the bubble all the time otherwise it is gone (which sometimes forces me to copy all but last character from that message).
On Ubuntu, try
Hover on the error or warning popup text
Maintain CTRL to keep it displayed
Use the cursor to select the text

What is the shortcut for the little auto suggest blue bar in Visual Studio 2012

In Visual Studio, when you type in a Class name or property that Intellisense doesnt recognise a little blue bar show up underneath the first letter of the word with options like suggestion the namespace to import and refactor etc.
Does anyone know the shortcut to open that window with having to mouse over it? I can't for the life of me find it on Google, probably because I can't find out what the function is called.
I use the Ctrl + . (period) shortcut to open that menu when the blue bar is showing.
Press Alt + Shift + F10 to bring up the context menu.
The commands in this menu are also available in Edit + IntelliSense + Generate. Only the Generate Method has a predefined shortcut key: Ctrl+K, M. You could use Tools + Options, Customize, Keyboard to assign additional ones.

Resources