Andriod 字符串数组里加入字符串元素
private String[] t1 = { "姓名", "性别", "年龄", "居住地","邮箱"};
private String[] t2 = { "般若", "男", "25", "北京", "bangruo@gmail.com" };
private String[] mListTitle = null;
private String[] mListStr = null;
private int int_close = 0;
mListTitle = insert(t1, "订单编号");
mListStr = insert(t2, "退出");
//////////////string[]添加元素函数/////////////////
private static String[] insert(String[] arr, String str)
{
int size = arr.length;
String[] tmp = new String[size + 1];
System.arraycopy(arr, 0, tmp, 0, size);
tmp[size] = str;
return tmp;
}
////////////////////////////////