gpt4 book ai didi

java - 获取安卓 :text from online strings

转载 作者:行者123 更新时间:2023-11-29 20:33:52 25 4
gpt4 key购买 nike

如何获取带有在线字符串的android:text?

我的代码

<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_contrnt"
android:text="@array/mylist"/>

我试过了

<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_contrnt"
android:text="@http://myUrl.com/strings.xml"/>

在我的服务器中的 strings.xml 中

<resources>
<string-array name="mylist">
<item>My Item1</item>
<item>My Item2</item>
</string-array>
</resources>

但是失败了

我该怎么做?

最佳答案

据我所知,您无法访问在线资源,因为 official site说:

You should place each type of resource in a specific subdirectory of your project's res/ directory. [...] the res/ directory contains all the resources (in subdirectories).

关于java - 获取安卓 :text from online strings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31607867/

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