I am quite new to Android development. Can someone let me know the relevant APIs to dynamically update a TextView
(or entire screen )?
For example: I have a search application and I need to show the results as they are found rather than waiting for all results and then show.
There are a few steps and you didn't mention how much you know versus how much you don't.
Assuming your UI initial structure is defined in the res/layout and it includes a TextView somewhere, in your activity:
public void updateTextView(String toThis) {
TextView textView = (TextView) findViewById(R.id.textView);
textView.setText(toThis);
}
Try this one
TextView textView = (TextView)findViewById(R.id.textViewID);
textView.setText("The test you need");
view.invalidate(); // for refreshment
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