如何在运行时修改的strings.xml文件 [英] How to modify strings.xml file at runtime

查看:571
本文介绍了如何在运行时修改的strings.xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会得到本地化数据仅动态

有没有办法在Android的运行时更新的strings.xml 文件?我们可以在运行时新的字符串添加到文件?


解决方案

  

我们可以在运行时新的字符串添加到文件?


没有。您可以创建翻译数据库和维护数据库。在飞行到数据库中添加新的翻译,并从那里读出值。

I will get localized data dynamically only.

Is there a way to update strings.xml file at runtime in Android? Can we add new string to the file at runtime?

解决方案

Can we add new string to the file at runtime?

No. You can create a database of translations and maintain that database. Add new translations on the fly to the database and read the values from there.

这篇关于如何在运行时修改的strings.xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆