推荐安卓开发神器(里面有各种UI特效和android代码库实例)
public class Home extends Activity {
public static final String ARRAYS_COUNT = "com.yourname.ARRAYS_COUNT";
public static final String ARRAY_INDEX = "com.yourname.ARRAY_INDEX";
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final String data[][] = new String[][] {{"1","pavan"},{"2","kumar"},{"3","kora"},{"1","pavan"},{"2","kumar"},{"3","kora333"}};
Bundle bundle = new Bundle();
int count = data.length;
bundle.putInt(ARRAYS_COUNT, ARRAY_INDEX );
for (int i = 0; i < count; i++)
bundle.putStringArray(ARRAY_INDEX + i, data[i]);
Intent intent = new Intent(this, Second.class);
intent.putExtras(bundle);
startActivity(intent);
}
}
public class Second extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
int count = bundle.getInt(Home.ARRAYS_COUNT, 0);
ArrayList<String[]> arrays = new ArrayList<String[]>(count);
for (int i = 0; i < count; i++)
arrays.add(bundle.getStringArray(Home.ARRAY_INDEX + i));
String[][] data = arrays.toArray(new String[][]{});
}
}
}