java - How to use String array in another activity -
i have 2 activities. each extends activity. tried ways found here, none of them working. need send string array 1 other activity, stay in first activity. try this:
intent intent = new intent(activityfrom.this, activityto.class); intent.putextra("string-array", array); activityfrom.this.startactivity(intent);
and recive:
intent intent = getintent(); string[] array = intent.getextras().getstringarray("string-array");
any idea?
bundle b=new bundle(); b.putstringarray("key", strarray); intent intent=new intent(this, nextactivity.class); intent.putextras(b); startactivity(intent);
Comments
Post a Comment