android-studio - 如何在 Android Studio 中切换到显示的 UI 并更改字体颜色?

标签 android-studio

我用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

enter image description here

B.png
enter image description here

最佳答案

设置 -> 编辑 -> 颜色和字体 -> XML -> 属性值 .然后你可以将它设置为粗体、斜体、前景、背景等等。

但你为什么要这样做?有关系吗?

关于android-studio - 如何在 Android Studio 中切换到显示的 UI 并更改字体颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31133912/

相关文章:

android - 在 Android Studio 中旋转移动位图

android - android apk 中的 libclasifier_jni.so 是什么?

android - Gradle 同步失败 : Could not find method android() for arguments on root project on android studio

javascript - AVG(COLUMN_SCORE) 未生成平均值

java - 恢复按钮无法进行最后一项 Activity

java - 预览xml布局文件,无需构建项目android studio

android-studio - 如何防止 Android Studio/AVD "CANNOT TRANSLATE guest DNS ip"错误消息?

android - 在 Android Studio 中构建项目时出错

java - 安卓工作室 : How to programmatically change an adjacent TextView on the same tablerow?

Android Studio 设备在插入时离线