我想把当前显示的字符串从TextSwitcher
(字符串将被置于一个的字符串数组中)与其他字符串数组,我不知道哪一种方法,我应该做的,因为.getText
不`吨工作textSwitcher。从TextSwitcher添加字符串数组
如何加载和添加字符串到现有的但不使用在这个活动字符串数组?
我在网上找到了这个方法,为什么它不起作用?
Resources res = getResources();
String[] favorites = res.getStringArray(R.array.favorites);
String[] planets = res.getStringArray(R.array.planets_array);
String[] temp = new String[favorites.length+1];
System.arraycopy(favorites,0,temp,0,favorites.length);
temp[favorites.length] = planets[mCounter];
favorites = temp;