-2

I declared String A in Class A and I want to send this String A to Class B(MainActivity that include inputView) for appending to inputview.

I found,

Changing text from another activity

This solution is very simple and easy.

However, android studio warned me that
"Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)".

Any better solution?

Community
  • 1
  • 1
Ben Lee
  • 3
  • 3

1 Answers1

0
Community
  • 1
  • 1
Vijay
  • 227
  • 3
  • 18