How to switch to the displayed interface and change the font color in Android Studio?

I use Android Studio to write my application, the following code is my layout file, but sometimes the Android Studio editor displays A.png and sometimes displayed B.png, this means that someday the system will replace android:text="@string/myabout" to the real string" O ", but I don’t know how to switch to the user interface.

And yet, how can I change the color of the android:text="@string/myabout" code android:text="@string/myabout" and android:text="Hard Code" ? You know that File-> Settings β†’ Editor is a huge tree, I can’t find which elements I want to edit.

 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/border_ui" android:orientation="vertical" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/myabout" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hard Code" /> </RelativeLayout> 

A.png

enter image description here

B.png enter image description here

+6
source share
1 answer

Settings β†’ Editor β†’ Color and Font β†’ XML β†’ Attribute Value . Then you can set bold, italics, foreground, background, and something like that.

But why do you have to do this? Does it matter?

0
source

Source: https://habr.com/ru/post/989996/


All Articles