【问题标题】:Android Studio" Edit the string resource value from the layout.xml without switching to strings.xmlAndroid Studio" 编辑 layout.xml 中的字符串资源值,无需切换到 strings.xml
【发布时间】:2016-09-10 08:16:53
【问题描述】:

我们可以将直接硬编码的字符串中的字符串资源提取到string.xml资源文件中吗?但是如何编辑字符串资源值呢?

例如:

<EditText
    android:id="@+id/notes"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/notes 
/>

如何直接从布局文件中更改@string/notes 的值?

【问题讨论】:

    标签: android-studio android-resources


    【解决方案1】:

    我只是打开存储变量的地方:

    Windows: 突出显示变量并按 CTRL + BCTRL + 单击

    苹果机: 与仅 Windows 相同的 CMD 而不是 CTRL

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-06
      • 1970-01-01
      • 2018-04-20
      • 2011-12-13
      • 2016-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多