Where is Android Studio Markdown support plugin preview preference? - android-studio

I want to show preview for markdown.
But it is not shown.
I am using Markdown support by JetBrains. And Android Studio 3.1
I found IntelliJ help.
https://www.jetbrains.com/help/idea/markdown.html
But I can not see that preference.
How can I see markdown preview?

Updating JetBrains Runtime (JBR) will solve the issue.
Start the IDE, use Help -> Find Action, type "Choose Boot Java Runtime for the IDE", press Enter.
Select the newest version with JCEF to install.
Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
Restart the IDE and Enjoy.
Video(44S): https://youtu.be/Mtu3dUgK480

Go to File>Preferences>Editor>File Types then select Files Opened In AssociatedApplications and add *.md to the list
Reassign the wild card
Do likewise for the Text file type
Enable the Markdown
Go with Vladimir Schneider
Preview like a bawse!
UPDATE: As mentioned by #desgraci below. It's now a paid plugin. It doesn't even show up. It would ideally work as indicated in the updated documentation but some requests left in the reviews.

I'm unable to make it work.
I suggest giving up and opening it in Visual Studio Code.
Right-click tab with your file, select Split Right.
In second instance, right-click tab again and select Open in Preview.
Now you have text and preview at the same time.

Taken from https://issuetracker.google.com/issues/159933628?pli=1#comment7
In the Android Studio:
Find action (ctrl + shift + A / command + shift + A)
Search for Choose Boot Java Runtime for the IDE
Select the latest version in
the "New:" dropdown - e.g. 11.0.12+7-b1504.27 JetBrains Runtime with
JCEF OK Restart
Worked in: Android Studio Chipmunk | 2021.2.1 Patch 1 | Build #AI-212.5712.43.2112.8609683

There is another plugin which is "Markdown Navigator Enhanced" and that I tested on Android Studio 3.5.2, it enables a toolbar with some editing functions as well as the preview options.
You can Edit, preview or do both in a split window, you can even show the HTML code.
The plug-in is paid, but it has a 30-days trial that can be good for a short usage.

Download plugin first,and then you'd better do something to active it:
Windows:
AndroidStudio ->File -> Editor ->Coe Style -> File Types->Markdown-> + -> *.md -> ok -> ok
Mac:
AndroidStudio -> Preferences -> Editor -> FileTypes -> Markdown-> + -> *.md -> ok -> ok
Then enjoy writing in md.

This is not just a JavaFX issue, which can be resolved by installing Choose Runtime plugin and choosing a different JDK. The Markdown plugin itself also references classes from IntelliJ UI, which means that even with a runtime that includes JavaFX, it still requires IntelliJ and won't work properly with Android Studio:
Caused by: java.lang.ClassNotFoundException: com.intellij.ui.javafx.JavaFxHtmlPanel PluginClassLoader[org.intellij.plugins.markdown, 193.6494.42] com.intellij.ide.plugins.cl.PluginClassLoader#4fa7c8ac
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 93 more
It will still work with the default bundled JDK, just reduced functionality without the preview panel.
References:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003498520-Mardown-plugin-doesn-t-show-preview
https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under

A little late but you can go to Settings/Preferences -> Editor -> File Types. Select Markdown Language from the list. Below, in the Registered Patterns section, add *.md, press ok, and restart Android Studio

Elijah's answer is great, but you may have to do ↓ after his actions.
Preferences -> Editor -> FileTypes -> Markdown-> + -> *.md

Since there is no good plugin for Android Studio IDE, If you have VS Code, I recommend Markdown Preview Enhanced plugins.
Or if you work a lot with Notepad++ , you can install the MarkdownViewerPlusPlus plugin
Follow folowing steps for Notepad++ MarkdownViewerPlusPlus plugin setup:
Download MarkdownViewerPlusPlus, you get a .dll file
Open notepad++ -> plugins -> open plugin folder
create subfolder "MarkdownViewerPlusPlus", paste your .dll file
restart notepad++, in plugins menu options now you should see MarkdownViewer++.

File -> Editor -> File Types->Markdown-> + -> *.md -> ok
File -> Editor -> File Types -> ASSOCIATE FILE TYPES WITH ANDROID STUDIO -> select all -> ok -> yes
File -> Plugins -> Marketplace -> search "Markdown" -> install -> APPLY -> OK
Help -> Find Action -> "Choose Boot Java Runtime for the IDE" -> Select the runtime that comes with JCEF support -> OK
restart Android Studio

My solution to this issue is to preview on VS Code
Go to File>Preferences>Editor>File Types then select Files Opened In AssociatedApplications and add *.md to the list
when you open the md file it will ask if you want to open it with your favorite file editor select vs code

Alternatively you can use markdown editors separately. Here are few options:
MacDown for Mac
Typora
GhostWriter
Few more online editors:
StackEdit
Dillinger
Editor.md
Draft

In the Android Studio:
Find action (ctrl + shift + A / command + shift + A)
Search for Choose Boot Java Runtime for the IDE
Select the latest version in the "New" dropdown - e.g.:
11.0.16.8-2043.64-jcef JetBrains Runtime with JCEF
OK
Restart
Worked in:
Android Studio Electric Eel | 2022.1.1
Build #AI-221.6008.13.2211.9477386, built on January 11, 2023

Related

Android studio automatically open's documentation view

I don't know if it is bug or kind of setting, but it is very annoying while typing value i.e. android:layout_gravity="", it opens hints with dropdown, and after a while the documentation view gets opened and hides the dropdown with hints.
I checked that no button is suspended or anything like that. I use Ubuntu 14.04.
Strange, because I've not changed anything with AS from months and there was no such behavior before. There's solution:
Follow the simple steps to remove open Documentation by cursor move :
Android Studio -> File -> Setting -> Editor -> General
Right side of the screen go to Others :
Uncheck checkBox show quick documentation of mouse move & Apply.
Preferences > Editor > General > CodeCompletion > uncheck Auto popup feature
I found out that I don't want to disable the documentation.
Instead, I set the window to be 'Opened as Popup',
This displays the documentation aside to the cursor and autocloses it automatically.
Surely I've set it before as a 'Tool Window' to see the full content and then I forgot to set it back.
Note that this functionality has been moved recently. It's now in:
Android Studio -> Preferences -> Editor -> General -> Other.
Uncheck "quick documentation on mouse move".
Studio 3.4.2, somehow had setting checked, uncheck it.
File -> Settings -> Editor -> General -> Code Completion.
Cheers
This the only correct answer as far i know because i sorted out this way only. Just click on Help>find Action>auto(in the search box)> and uncheck the checkbox in the image shown
For Android Studio 4.x ~ Arctic Fox | 2020.3.1
Preferences > Editor > Code Editing > Quick Documentation > Show quick documentation on mouse move: unchecked

How to create my own 'Reformat Code' style in Android Studio?

In Eclipse,(Window -> Preferences -> Java -> Code Style -> Formatter) there was a facility to create my own format style and apply it in the code. Is there a way to do that in Android Studio(for Java code) ?
To change formatter options go to File | Settings | Code Style | Java
To reformat your code manually, press Ctrl + Alt + L (or using the menu Code | Reformat code...). To reformat the whole source code of your module, just select the module folder first.
More information about reformating source code can be found on the IntelliJ Web Help
In Android Studio 3.3.2 (running in Mac OS) "Android Studio" -> "Preferences" -> "Editor" -> "Code Style" -> "Java".
I would be useful to find a way to export/import only code format settings in order to share them between the team.
Open global settings/preferences via ⌘, or Android Studio > Prefences.
In the left hand side bar, go to Editor > Code Style.
open the scheme: drop down menu and select Default IDE.
Click the cog menu to the right of the drop down menu and select duplicate....
Then rename your new profile, and change the general settings as well as the settings for each language in the sub menu of Code Style as you see fit.
Then with you new profile selected, reformat your code with ⌘ + ⌥ + L
These style are global and can be used in other projects.
Same method applies for Code Cleanup too.

Remove unused imports in Android Studio

I recently started Android Studio IDE to make my android apps. I find shortkey to remove unused import in Android Studio is not working (Ctrl+Shift+O)
What is shortcut key to do same in Android Studio?
Simple, right click on your project in Android Studio, then click on the Optimize Imports that should work.
Update
To do same thing which I described above, you can do same just pressing Ctrl+Alt+O, it will optimize imports of your current file and your entire project depends on your selection in a dialog.
You can do it on the fly. You don't need to call (Ctrl+Shift+O) or "Project/Optimize Imports..." each time.
Just set this checkbox in Settings -> Editor -> General -> Auto Import -> Optimize Imports on the fly.
On OSX: Preferences -> Editor -> General -> Auto Import -> Optimize imports on the fly
Press Ctrl + Alt + O.
A dialog box will appear with a few options. You can choose to have the dialog box not appear again in the future if you wish, setting a default behavior.
It is very Simple Just Follow the below step.
Switch your project in Project Mode.
Then right-click on project name.
The final step is to select the Optimize imports from popup menu.
Enjoy!!
On Mac use control + option + O
Sorry for the late answer.. For mac users command + option + o
Try this.. It is working for me..
Ctrl+Alt+O works pretty well and removes unused imports
there is also an Android Studio (1.4) setting to optimze imports on the fly: see Settings->Editor->General->Auto Import.
I think Ctrl + Alt + O works when the import is unused but a valid import. However, say you try to import a class from a package that does not exist or no longer exists (which can happen during refactoring), the shortcut command does not work (atleast it didn't for me). If you have more than one file like this, things can get problematic.
To solve this problem, click on Analyse -> Inspect code -> (select your module / project). Let it perform the analysis. Go down to Imports -> Unused imports. Click on the "Delete unnecessary import" button that appears on the right.
here Android Studio Chipmunk | 2021.2.1 Patch 1
windows 10
ctrl+alt+o
worked perfectly
Press Alt + Enter with the cursor on top of the import. The Optimize imports menu will show. Press Enter again. Your unused imports will be removed.
Since Android Studio 3+, this can be done by open the option "Optimize imports".
Alt+Enter the select "Optimize imports".
This must be enough to removed the unused imports.
On MacOS (Monterey) + Android Studio (Arctic Fox 2020.3.1):
To Remove unused imports, follow below procedures.
Android Studio -> Code -> Optimize Imports
Shortcut key: Option + Command + O
Please see screenshot for more clarification. Thanks.
Specifically for Flutter Just set this checkbox Settings -> Languages & Frameworks -> Flutter -> Organize imports on save
you can use Alt + Enter in Android Studio as Shortcut Key

Strange key mapping in Android Studio

I am new to Android studio, it seems to be great IDE. But I have found that it has really strange key and shortcut mapping. I am using Czech keyboard.
When I try to type ">" by pressing Right ALT + . the symbol is not appearing, and I got message box that says "Go to custom Region. There are no custom foldings regions in the current file."
It is really strange behaviour, I have problem with writing many more characters like brackets,..... I tried to set keymap profiles to Visual Studio and more. But nothing seems to work. I didn't have any of these problems in any other IDE (Netbeans, Eclipse, Visual Studio, Xamarin)
Add this line:
actionSystem.force.alt.gr=true
to this file:
...\Android\android-studio\bin\idea.properties
As written here:
http://youtrack.jetbrains.com/issue/IDEA-91975
Yes, well... its problem with "old" keyboards. Newer keyboards don't have Alt Gr keys and IDE doesn't count on this in default.
Solutions:
Buy a new keyboard with no Alt Gr on it (using right Alt instead of Alt Gr is working for me)
Go to File -> Settings -> Keymap and search for implementation - delete Ctrl + Alt + B, hit "Apply" and you can now use this shortcut for "{"
As already mentioned below... add following line to ..\<Android Studio folder>\bin\idea.properties:
actionSystem.force.alt.gr=true
(update) Since newer version of AS (not sure which one, should be 2.3.3+), you don't need to manually access the properties file. Go to Help -> Edit Custom Properties and add actionSystem.force.alt.gr=true there.
Go to Preferences -> Keymap and choose Mac OS X as Keymaps.
I have been a long time Visual Studio user, so wanted to leverage all the keyboard shortcuts that I had picked up using Visual Studio.
On Android Studio, I first changed the Keymap to be Visual Studio. You can do this by using Alt+F7 on Windows and then search for Keymap.
By using the Visual Studio Keymap in Android studio, I got only debug related mapping, which was still a minority of what I use in Visual Studio.
So went ahead and added/modified some more mappings.
Here is the github link
https://github.com/vinayakg/VisualStudioKeymapforAndroidStudio/blob/master/settings.jar.
PR's welcome.
As for '>' sign (AltGr + .) and Android Studio 1.0.1, go to File>Settings, choose Keymap in IDE Settings section, search for "GotoCustomRegion" item (it is located in MainMenu-Navigate) and remove its mapping (via context menu).
If you're using macOS newest versions and have had weird behavior with the shortcuts, try this:
Go to Android Studio -> Preferences -> Keymap
Now change from "Mac OS X" to "Mac OS X 10.5+" and hit apply.

How to change or add theme to Android Studio?

I have just installed Android Studio in my Window 7 64bit.
When I launch the application the background of the screen where we write the code is white.
I would prefer black or any other color.
I am not sure whether we can change the color/theme OR add more themes.
File->Settings->Editor->Colors & Fonts-> In scheme name select Darcula and apply to see a awesome dark background theme editor
Android Studio 3.1.2
File->Settings->Editor->Color Scheme-> In scheme name select Darcula and apply to see a awesome dark background theme editor
You can download new themes from https://github.com/sdvoynikov/color-themes -- note that the project is deprecated at this time, but the sources are still available.
Once you have downloaded the .jar file, go to File -> Import Settings... and choose the file downloaded.
//you need to go to the File-> settings
in that choose IDE settings-> Appearance in that choose the Theme: options
Windows
File->Settings->Editor->Colors & Fonts->
Mac OSX
Android Studio -> Preferences->Editor->Colors&Fonts
Dayle Reese has an amazing set of color schemes available for use in both AndroidStudio and Intellij. Depending on the IDE you are using, these ICLS files go into a particular directory (This is for Windows):
Android Studio
%USERPROFILE%/.AndroidStudio/config/colors
IntelliJ
%USERPROFILE%/.IntelliJIdea/config/colors
Once you've placed the ICLS files in one of the directories above, relaunch the IDE so that it picks up the new themes. There is also a nice page containing a preview of most/all the themes so you can figure out which ones you like most. Enjoy.
If one just need to change (strictly just) the editor's background to your own colour.
Preferences > Editor > Color & Fonts > General > Default Text > Background
Although you need to save it as your own theme.
Just a note for people in the future.
To add more themes on a Mac, put the theme .icls files in
~/Library/Preferences/AndroidStudio/colors/
Then restart Android Studio. And select your new themes in
Android Studio > Preferences > Editor > Colors&Fonts
Android Studio can use any theme that are made for jetbrains IDE. Here is a good Github repo that has many themes for different IDEs.
Also, the Color Ide plugin is a good tool that changes the background colour of all menus in Android Studio to match your theme. Try it, the IDE will look much better.
Windows should have similar setups, just the theme directory will be a bit different, search for JetBrains Ide theme location should give you the result.
Press Ctrl+` (Back Quote).
Then select "Switch Color Scheme" or press 1.
Select "Dracula" or press 2.
(Note: the exact paths shown here are primarily for Windows and Linux. I know Mac has a few non-standard paths, so if you're on Mac, you may have to adjust the starting bit of the path. The point is, get into settings however you'd do that on a Mac)
Switch theme:
File -> Settings-> Appearance & behavior -> Appearance.
Select the "theme" dropdown, and change between whatever themes you have installed. It shows the default themes and any you have installed in the form of plugins.
Install new themes
As plugin from plugins.jetbrains.com
File-> Settings -> plugins -> install JetBrains plugin/browse repositories/install plugin from disk
Note: newer versions of Android Studio, and possibly IntelliJ, (at least Jan. 2021 and out) may instead have a Marketplace tab in place of the first and/or second one.
The last part has three different options. The first has a few amount of plugins, and looks like only the official plugins. Browse repositories have much more plugins, and seems to be like going to the plugin page. This is a shorter way than going to the intelliJ plugin page and downloading the plugins manually. If you download, click install plugin from disk. This allows you to drag and drop, or find .jar files.
In the install JetBrains plugins, browse repositories, and (newer versions) Marketplace tabs should have a search functionality. You can search for i.e. "theme" from there.
Download a color theme you like - some sites host these, and some GitHub repos may offer them as well. [Editor's note: the website previously linked here has been replaced with spam]
Import the theme. File -> Import Settings. Navigate to the theme-name.jar. Click the "Ok" button. This will tell you restart your application, at least it did for me, and it automatically selected the theme for my editor.
Change the editor's theme color by going to File -> Settings -> Editor -> Colors & Fonts. Select the scheme and click the "Ok" button.
Note that this changes the editor's theme color, not the entire application's theme.
File->Settings->Appearance
There's a dropdown box with various themes.
Mac OS
To install new Theme on Mac go to Preferences -> Plugins -> Browse Repositories -> Select Category "UI" and search theme name, I recommend "Material Theme UI" click on the green button "Install" and then restart after installation.
If your theme is .icls format.
Right click on finder and select "go to folder"
type "~/Library/" to go to hidden library folder
find "Preferences"
find "AndroidStudio2.x"
if you don't have "colors" folder then create one
paste .icls theme files into colors.
new theme will be installed.
to change themes go to Preferences -> Editor -> Colors & Fonts and then select the scheme.
In 2.3.2 i can change the theme by following
View -> Quick Switch Theme -> 6.Look and Feel
Go to File > Settings,
now under IDE settings click on appearance and select the theme of your choice from the dropdown.
you can also install themes, they are the jar files
by
File > Import Settings, select the file or your choice and select ok
a pop up to restart the studio will open up click yes and studio will restart and your theme will be applied.
For additional themes I visited https://plugins.jetbrains.com/search?headline=164-theme&tags=Theme I was able to download one of them. I closed all my tabs opened and simply dragged and dropped the jar file. That was the way Android Studio prompted to restart. I tried importing the jar file as mentioned previously but it simply didn't work.
Thought I would add this as an answer, for anyone who accidentally mess up like I did!
It't not really an answer to the original question, but a few other posts refer to this post, so thought I would add it here (cause its slightly relevant to the question). Hope it helps someone!
Today I accidentally set my IDE font size on Android Studio very high (was going to set it to 10, but it accidentally became 110).
Now, the big issue for me was that opening the file menu was not possible (well, could open it, but could not get to the settings choice), so I had to figure out how to do it manually.
I found the Android Studio IDE settings in the Users/%username%/.AndroidStudioPreview/config folder and in there, the ui.inf.xml file, in which I could change the option FONT_SIZE back to a more manageable size.
Following image is android studio with 110 px font size on a 1920x1080 screen:
File->Settings->Appearance & Behavior-> Appearance and In theme select Darcula and apply dark background theme editor.
On OSX, in the menu bar at the top, click on Android Studio > Preferences > Appearance and you will see a theme drop down.
You can try this Making Android Studio pretty to change the android studio look and feel different.
To install Custom theme in android studio --version 4.1.2
download theme file(.jar) from https://plugins.jetbrains.com/
open android studio
drag the .jar file into studio
On Windows:
File-> Settings-> Appearance&Behavior-> Appearance:
Change "Theme field".
Simple. Just hit CTRL + alt + s - appearance & behavior - appearance - Theme - (Darcula)
You can use CTRL + SHIFT + A and then simply type theme to go directly to the theme settings. Same goes for pretty much any setting, refactoring or action you're looking for.
In Android Studio 3.4.2:
As mentioned in previous answers, you can change theme to Darcula in Appearance & Behavour > Appearance to have default dark theme.
Since macOS Mojave you can use dark mode in system. My issue was the system window bar was still light only for Android Studio:
Note there's an option to change this next to the theme selector: Use dark window headers
You can change or import a theme by using the icon that the "Duplicate Theme" arrow is pointing to in the photo.
Every one sees color differently. Most times a small change in contrast is all you need. Removing the hase from Dracula by changing the Background color to 242527 was perfect for me.
File - Settings - Appearance & Behavior - Appearance - CHOOSE Darcula in "Theme" - Press Apply.
or
Choose File - Settings - Editor - Colors & Fonts - Then SELECT Darcula in scheme name - Press Apply - restart Studio (sometimes not all elements implement theme)
Mac os : mojave / Android studio 3.5
mac os : Android Studio > Preferences > Editor > Color scheme > Scheme : Darcula
well most of these answers tell you about installing currrent theme , I will tell you the easy way to install new theme as of march 22 ,2022 .
while in android studio press ctrl + `
you may see this option switch
select Theme from the menu
then you will see themes installed .
change this or click on the last option 'install themes' to install new themes directly
Follow the steps :
Go to File -> Settings -> Appearance&Behaviour -> Appearance
Change the theme to whatever you like.
Then restart the android studio.
For easy reference in Android Studio 3.0.
Click File > Settings > Appearance & Behaviors > Apperance

Resources