gpt4 book ai didi

Android:资源String自动生成

转载 作者:太空宇宙 更新时间:2023-11-03 11:27:01 27 4
gpt4 key购买 nike

我是 Android 新手。当我在图形布局中添加按钮/ View 时,它会以这种方式添加标签文本 - android:text="Button"。为什么不在string.xml文件中添加"android:text="@string/my_label"并添加一个字符串资源,在eclipse中不能自动完成吗?

最佳答案

我已经搜索了很多,但我没有找到任何自动的方法来将字符串添加到资源文件但是恕我直言,这会节省你很多时间。

选择一个String,点击Refactor --> Android --> Extract Android String。

关于Android:资源String自动生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12219299/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com