How To Restore Android Studio Font - android-studio

I was trying to change the font of Android Studio. I selected a font and pressed Apply Changes button of the Dialog and from then onward my android studio looks like this.
I re-install the software which also doesn't solve the problem.
I also tried to change the theme font from the xml file located at C:\Users\tuser\.AndroidStudio1.5\config\colors\Obsidian\ which is also not working.
I Read, How to reset android studio font, and tried pressing shift twice and ctrl + shift + a, the search dialog appears like this
So, How can i restore the font?

Maybe this will help (I see you're using windows):
Go to your User Folder - on Windows 7/8 this would be:
[SYSDRIVE]:\Users[your username] (ex. C:\Users\JohnDoe)
In this folder there should be a folder called .AndroidStudio (notice
the period at the start - so on some OSes it would be hidden).
Delete this folder (or better yet, move it to a backup location - so
you can return it if something goes wrong).
This should reset your Android Studio settings to default.
The answer is from:
How to reset Android Studio by free3dom author.

Related

Android Studio isn't showing the xml editor [duplicate]

How can I enable the text/design Tab on the a src/main/res/layout folder on the activity_main.xml file that was created automatically during create new project? If i do right click and create xml file on the said folder, the design/text tab exist. Any suggestion? Thanks.
No Text/Design Tab on the Bottom Part of the Android Studio
Creating a new XML in the Res/Layout Folder, the design/text tab is now present.
Any help? this is super weird guys...
In Android Studio 3.6 use these three buttons (Code | Split | Design), on top right, to switch between views.
I had the same problem, restarting the IDE did make that tab appear again.
On Android Studio 3.6.1
Top Right corner under the main toolbar you have three different icons (Code, Split, Design).
View -> Tool windows -> Preview .
Output view:
use the three buttons (Code|Split|Design)on top right hand side to switch between views.
I also had this problem after upgrading to 1.5. None of the above suggestions worked for me. I noticed that the default relative layout xml has changed with a third xmlns line and an app behavior line. I opened an older project and copied the old relative layout header to replace the new. Instantly the preview function was restored.
You can also Move between Design / Text tabs in layout’s view with simple shortcut:
(Mac) : control + shift + ← / →
(Windows / Linux): alt + shift + ← / →
On the top right corner of the activity_main.xml file view, there are 3 icons representing "Code", "Split" and "Design". Click on the leftmost icon of the three ("Code") for the text tab.
In the android Studio window, at the left side there are two options available(Project and Resource Manager). Go to resource and there you will see an ADD Module option, click on that. After this you will see your text and design option will get enabled, you can go to your work area by Project Name->app ->src ->main->res ->layout.
Yes, Even I had the same problem. For the first time... I think It wont show, restarting the IDE did make that tab appear again.
I had this problem too, I deleted all the preference files, such as the AndroidStudioPreview folder & com.google.android.studio.plist, then restarted android studio, it worked.
You do not need to restart an IDE. All you need is to close an xml file that does not get a tab and reopen it within an editor. It is a little bug.
Navigate to activity_main.xml tab then Design and Text tab appears.
It doesn't appear in MainActivity.java tab.
You do not need to restart IDE.
If text/design tab is missing in new android studio, this can solve by two methods.
You have re-install android studio. And don't forget to delete android studio related all files from temp and local.
Or you can re-install SDK (software development kit) according to your device.

Android studio: Auto completion not working with ctrl + space

Android studio: Auto-completion not working with ctrl + space and working but lagging(suggestions are loading slowly with a loading icon) with ctrl + shift + space.
Tried all the following based on the previous similar question:
made sure power save mode is off.
invalidated and restarted.
made sure relevant checkboxes are checked in code completion settings.
Also, suggestions are working with flutter project in Android studio but not with android project. Tried for solutions but didn't find any relevant doc.
Moreover, it used to show suggestions just after pressing '.' even without shortcuts. Updated some versions and the feature is disturbed. Does code completion depend on anything else?
Edit: suggestions are appearing but it's taking about 5 secs after pressing '.' or ctrl + space
In my case it was showing only for exact text case but after below steps it was working as expected.
File->Settings-> Editor -> General -> Code Completion.
Uncheck Match case checkbox if its checked.
You can also try this
1.Close Android studio then go to the folder where android studio is located
Or you can go to the
drive C -> users -> find .gradle file and do below things
Find .gradle file -> In .gradle folder delete caches folder
then restart android studio sync your files with gradle ....
its work for me :D

Android Studio Resetting Changes to Default Code Style

I'm here today because I'm having an issue with Android Studio. I don't know if it existed on previous versions (I don't remember this being an issue, so I doubt it was a problem on a previous version), but currently I am using the Android Studio V2.1 Stable release.
My issue is that if I launch Android Studio (I happen to be on Windows, 64-bit Android Studio) and at the Start Screen/Page, I click Configure>Settings>Editor>Code Styles, and change the default parameters on any of the languages (XML, Java, HTML, etc.), the Default profile is copied to a new profile (Default(1)) and the new settings get applied to each profile.
If I Apply these changes and exit Android Studio, and launch back up and follow the same method...the settings have completely gone back to what they were before I changed them, with the exception of the Default(1) copy profile. But from my experience, Android Studio doesn't build new projects based on this Default(1) copy profile, it builds them on the Default profile. Which means all of my adjustments to using indents and not spaces, keeping indents on empty lines, etc. all do not get carried through to the actual project files, leaving me to have to go back into the settings with the project loaded up and change all of these parameters again. That's just asinine. Please tell me I'm missing something here and that there's a simpler way of achieving the ability to keep a code style template that I can use on all of my projects!
Perhaps it would be better to report or consult on this using the Android Studio feedback site. If that's the better option, I'm willing to do that too.
Thanks everyone!
What I do in that case is
Go to Preferences
Code Style
Select scheme you want
Click Settings cog
Click copy to project
Some OKs and then it works.
After selecting the code style that i want, opened the gradle.properties file in root folder of the project and deleted the following line
kotlin.code.style=official
deleting the above line, prevents the code style resetting to default.
Go to Preferences
Code Style
Set Scheme to Default [IDE]
Click restore defaults
The simplest way I found to reset the default settings is as follows:
In Android Studio, click on File.
Settings (Ctrl + Alt + S)
Under Editor in settings
Select Code Style
Next to Scheme: select the three dots to access the scheme options ()
Select Restore Defaults
A Confirmation Dialog Box will be displayed to confirm if you want to revert back to
the default settings.

Using Custom Font for Android Studio Editor

I installed my favorite programming editor font - Inconsolata - on my Macbook Pro, but I can't seem to get it working in Android Studio. I've confirmed that the font works correctly on eclipse, so it is definitely installed correctly.
In the Android Studio options, it just shows a bunch of strange boxed A characters. If I select the font, my entire editor becomes boxed A characters.
Anyone know how to make this font work in Android Studio?
I got Inconsolata working by unselecting "Show only monospaced fonts." Before that, Inconsolata wasn't even showing up. I'm using Windows, but it might work for you.
The most simplest way to change font in Android studio editor is given below:
Step 1: Go to directory C:\Program Files\Android\Android Studio\jre\jre\lib\fonts
Step 2: Paste the font with.ttf extension i.e.,(True Type Font) file of your custom font.
Step 3: Open Android Studio and set the font through Settings/General/Font in the File Menu. But, make sure that you have to re-open the Android Studio if already open.

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