我用Android Studio 写我的App,下面的代码是我的布局文件,但是Android Studio 编辑器有时显示A.png 有时显示B.png,这意味着有时系统替换android:text="@string/myabout"
使用真正的字符串“About”,但我不知道如何切换到 UI。
还有,如何更改android:text="@string/myabout"
的代码颜色和 android:text="Hard Code"
?您知道文件-> 设置-> 编辑器是一棵巨大的树,我找不到我应该编辑的项目。
<?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
B.png
最佳答案
设置 -> 编辑 -> 颜色和字体 -> XML -> 属性值 .然后你可以将它设置为粗体、斜体、前景、背景等等。
但你为什么要这样做?有关系吗?
关于android-studio - 如何在 Android Studio 中切换到显示的 UI 并更改字体颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31133912/