string.xml如下:
<?xml version="1.0" encoding="utf-8"?>
<resources><string name="hello">Hello World, Login!</string>
<string name="app_name">数据中心移动办公系统</string>
<string name="tvUid">请输入密码:</string>
<string name="welcome">欢迎您登录数据中心OA系统!</string>
</resources>
java中代码获得:
txtWelcome=(TextView)findViewById(R.id.txtWelcome);
txtWelcome.setPadding(0,5, 0, 5);
String strWelcome=getString(R.string.welcome).toString();
txtWelcome.setText("福"+strWelcome);