I have an object on my main.xml layout file called thefact that is TextView. I also have a string called sharefact. I want to save what text is in the TextView into the shar
TextView theFact = (TextView) findViewById(R.id.theFact); String shareFact = theFact.getText().toString();
Getting text from a TextView returns CharSequence. To convert CharSequence to String, toString() function is used.
TextView
CharSequence
String
toString()
String sharedFact = theFact.getText().toString();