как перенести значения массива из одного класса в другой класс с помощью Intent??
Я пробовал так...
1-е действие...
Код: Выделить всё
Intent videointent = new Intent(Focusarea.this,Videoplayer.class);
videointent.putExtra("string-array", resim_list);
startActivity(videointent);
2-е действие
Код: Выделить всё
Intent intent=getIntent();
String [] Array = intent.getStringArrayExtra("string-array");
Я получаю это как предупреждение, а во второй секунде действия получаю нулевое значение.
Код: Выделить всё
W/Bundle(521): Key string-array expected String[] but value was a
java.util.ArrayList. The default value was returned.
W/Bundle(521): Attempt to cast generated internal exception:
W/Bundle(521): java.lang.ClassCastException: java.util.ArrayList
W/Bundle(521): at android.os.Bundle.getStringArray(Bundle.java:1459)
W/Bundle(521): at
android.content.Intent.getStringArrayExtra(Intent.java:3630)
W/Bundle(521): at
com.example.TEENEINSTIEN.Videoplayer.onCreate(Videoplayer.java:20)
W/Bundle(521): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
Подробнее здесь: https://stackoverflow.com/questions/163 ... -arraylist