当前位置:操作系统 > 安卓/Android >>

android字符串+数字变量方法

字符串中带变量数字的设置方法:
[html]
1. <string name="bt_delete">Delete(%1$s)</string>  
 
代码中使用:
[java]
1. bt_delete.setText(this.getResources().getString(R.string.bt_delete, selected.size())); 
 

 

 

摘自 知识空间

补充:移动开发 , Android ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,