Android Studio not displaying unicode characters - android-studio

I recently updated my Android Studio to v3.4. Now the unicode characters I had earlier used, is not displayed on the editor screen. I can see them on the app, but not in the code.
Check the screenshot for more idea.
In the strings.xml, layouts anywhere it is not displayed. I tried to change the color scheme, tried with a new profile, none worked.

In android studio, got to file menu.
Click on Invalidate Caches / Restart....
That will show up the strings properly.
Don't forget to upvote.

If you want to see Hindi Unicode
First You Download Poppins Font Download font
Then Open Android Studio
File > Settings > Editor > Font > (Untick) Show only monospaced fonts > Select Font > Poppins Light or Medium > Click OK Button
Result Result

Go to your res/strings.xml and add the following code:
<string name="fgmt_titre_drawer">YourText</string>
Then rebuild your project.

Related

Getting Small UI text size on Chrome OS after Android Studio update

As compared to the previous release of android studio editor text size is small On Chrome OS.
To resolve this issue, do the following:
Open the Settings window by clicking File > Settings
Navigate to Appearance & Behavior > Appearance.
Select Use custom font.
Increase the font size.
In the Settings window, navigate to Editor > Font.
Increase the font size.
Click OK.

How to view this missing toolbar/window in android studio?

The space at the top in android studio where recently opened java and xml files(I have marked that in my image) are shown has disappeared in my MacBook. How to bring it back?
At the top toolbar Window> Editor Tabs > Tabs Placement > Top.
that's should fix it.

Android Studio 3.5 Reformat Code in XML files issues [duplicate]

I've just updated to Android Studio 3.5 and now when I try to refactor the file AndroidManifest.xml, all my app permissions are moved to the bottom of the file.
Has anyone else faced this issue? Is there any solution for this?
Before refactor:
After refactor:
It is applicable to my all project files.
Why it matters:
You just need to set xml layout for Android applications from the settings.
Follow this steps:
1. Go to Android Studio > Preferences. For Windows, go to File > Settings.
2. Search for xml in search bar.
3. Under code style section, select xml tab.
4. In the top right corner, click on set from... and under predefined style, select Android
5. Click on Apply and try to refactor.
Reset the appropriate Android code style as follows.
For Windows Only
Step1: Click on the file menu.
Step2: Navigate to Setting.
Step3: Find Editor in the Left Panel**.
Step4: Find Code Style in the Sub Menu of Editor.
Step5: Click on XML in the Sub Menu of Code Style.
Step6: Click on Set from in Top right corner of Right panel.
Step7: Select Predefined Style.
Step8: Select Android.
Step9: Click OK.
For macOS Only
Step1: Click on the Android Studio menu.
Step2: Navigate to Preferences.
Step3: Find Editor in the Left Panel**.
Step4: Find Code Style in the Sub Menu of Editor.
Step5: Click on XML in the Sub Menu of Code Style.
Step6: Click on Set from in Top right corner of Right panel.
Step7: Select Predefined Style.
Step8: Select Android.
Step9: Click OK.
It seems the default scheme leaves out the "attribute" property in the arrangement rules. Adding them back in works like a charm for me.
The correction can be made in: Preferences > Editor > Code Style > XML
Just adding more details .
This is a known issue with android studio from Android Studio 3.5 Canary 8 . It should get fixed in next version as this turned out to affect large number of developers .
You can see status of the bug here
Also the solution is
Broken XML code style
When editing XML code, the IDE might apply an incorrect code style when you select Code > Reformat Code from the menu bar. To fix this issue, reset the appropriate Android code style as follows:
Open the Settings window by clicking File > Settings (on macOS, Android Studio > Preferences).
In the left panel, click Editor > Code Style > XML.
Near the top-right corner of the right panel, select Set from > Predefined Style > Android
Click OK.
Which is found here -> Known issues with Android Studio and Android Gradle Plugin
Edit: This is now fixed in Android studio version 3.5.2
ctrl + alt + s
Search XML
I wanted to do the same steps as the first answer, but I just needed to change the default scheme to project.
I hope that you also solve it this way . Sorry for my English !
If you have a custom code style defined, you have to specify a type for each rule: tag or attribute.
It seems like after the update, if you do not specify a type, the rules will be applied to both. Not sure if it is a bug, but that's how i fixed.
This does not work on 3.5
After adding the attribute type to each rule, it worked
Please follow these steps for Windows version of "Android Studio 3.5"
1: Click on the File in the Menu.
2: Go to Settings.
.
3: Click on Editor.
4: Click on Code Style
5: Click on XML.
6: Click on "Set from..." in top-right corner.
7: Select Predefined Style.
8: Select Android.
9: Click OK.
3.5.0 known issue
When editing XML code, the IDE might apply an incorrect code style when you select Code > Reformat Code from the menu bar. To fix this issue, reset the appropriate Android code style as follows:
Open the Settings window by clicking File > Settings (on macOS,
Android Studio > Preferences).
In the left panel, click Editor > Code Style > XML.
Near the top-right corner of the right panel, select Set from >
Predefined Style > Android.
Click OK.
For anyone searching this for Android Studio 4+ :
File -> Setting -> Editor -> Code Style -> XML -> Arrangement ->
Set Force rearrange to "Never"
Set from to "Android"

Why Android Studio icon in windows taskbar automatically changes?

When I installed Android Studio in my Windows 10 pc, then icon for Android Studio used to be this :
But after a few days, icon has changed itself into this :
How to fix this?
In your taskbar, right click -> Properties -> Untick Use small taskbar icons. (With similar meaning, I don't know the exact original text in English).
The icon file of Android Studio, $ANDROID_STUDIO/bin/studio.ico, is an icon file containing 6 pictures, using the size of visible area to decide which one to use. Asking the taskbar NOT to use small icon will solve your issue.
This bug has been fixed, just delete the studio.ico file and it will work.

How to make the emojis display well in windows android studio code editor view?

How to use emoji in the Android source code in Android studio or IntelliJ in Windows OS? I want to use emojis in the logcat print messages by choosing emojis from the context-sensitive popup. I could not find the right plugin.
I need the plugin that is used in the picture below. But don't know how to achieve the same. When I googled I get references to emoji-compat for showing emoji in the android application's soft keyboard dialog. But I want to use emoji in the source code in the comments and logcat only.
Update: I thought it is an android studio feature. But it is available as soft touch keyboard in windows 10. "WIN + ;" is the shortcut for launching the same.
Now, my next question is how to make the emojis display colorful in windows android studio's code editor and logcat like the way it appears in the Mac.
In Mac it appears like this:
In windows it appears like this in the editor after adding the emoji:
On mac position the cursor in any text field you'd like to insert an
emoji, like posting a tweet for example.
Use the keyboard shortcut Command - Control - Space bar to access
emoji.
Double-click the emoji you'd like to use and it'll be inserted where
you left your cursor.
In your screenshots, the emojis appear to be rendered in a monochrome version in your editor. I've experienced a similar problem with the display of emojis in IntelliJ on macOS.
At first, I thought it was due to a character encoding setting. This turned out to be unrelated as my file encoding is set to UTF-8 everywhere.
After living with the problem for quite some time, the solution I've found to have emojis display right for me is to set the fallback font (for symbols not supported by the main font) to "Apple Color Emoji" for both the editor and the console.
The corresponding UI path for this setting is listed below.
Preferences > Editor > Font
When a color scheme font setting overrides the editor font, then the following paths can apply.
Preferences > Editor > Color Scheme > Color Scheme Font
Preferences > Editor > Color Scheme > Console Font
"Show only monospaced fonts" will need to be disabled temporarily to show the emoji font under "Fallback font".
Additionally, I made "Paste without Formatting" be my default paste option so that emojis can be pasted directly, without risk of being transformed into Unicode escape sequences.
The result is that emojis display as expected for me throughout the IDE, making a big difference to my coding pleasure!
The code editor now correctly handles Unicode emoji characters. On Mac OS X emoji characters are rendered as colored images. On Windows and Linux emoji are rendered as monochrome characters.
Source: https://blog.jetbrains.com/idea/2016/12/intellij-idea-2017-1-eap-is-open/

Resources