I set text view data from SpannableString. It works correct. But when I press back button from another activity text view not shown data in Oreo. It works correctly in other version but not work in high version. What is reason?
Here my code for set data:
tvItinerari=(TextView) view.findViewById(R.id.tv_1);
String text = "";
String name = "";
for (Itinerary item : arrayList) {
text += item.getItinerary()+" ";
}
SpannableString ss = new SpannableString(text);
int start = 0, end;
for (final Itinerary item : arrayList) {
setSpanOnLink(ss, item.getItinerary(), new MyClickableSpan(item));
}
tvItinerari.setText(ss);
Log.e("ss",""+ss);
It works in all version not in Oreo.
Data show correctly in low version like lollipop but not work in High version.
Check arrayList size i think its zero when you back your activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With