You need a reference to that textview and then do:
textView.post(new Runnable() {
public void run() {
textView.setText(yourText);
}
});
in Kotlin:
val textView: TextView = findViewById(R.id.textView)
textView.post(Runnable { textView.setText(yourText) })
More Related Contents:
- Save data in a SQLite database with the original format and view those data again with that form format
- How to make an Android Spinner with initial text “Select One”?
- How to add dividers and spaces between items in RecyclerView
- How can you tell when a layout has been drawn?
- Eclipse giving error, missing R.java file after recent update
- Don’t reload application when orientation changes
- getExternalStoragePublicDirectory deprecated in Android Q
- Is there a way to hide the system bar in Android 3.0? It’s an internal device and I’m managing navigation
- Android Studio : How to uninstall APK (or execute adb command) automatically before Run or Debug?
- how can I detect whether the android phone in Silent mode programmatically
- How to access the camera from within a Webview?
- How to do circular scrolling on ViewPager?
- Open Android app from URL using intent-filter not working
- Android: looking for a drawArc() method with inner & outer radius
- android’ is not recognized as an internal or external command
- Best practices: Layouts on Android (Programmatic vs XML)
- Difference between OnTouch and OnClick Android
- Travis CI failed because cannot accept license Constrain Layout
- How To give notifications on android on specific time?
- Gradle: How to Build different flavours of different built types?
- How can I pin a certificate with Square OKHTTP?
- AJAX Request from Phonegap Android fails
- Edit Text shows exception Invalid Int “”
- ClassCastException android.widget.FrameLayout$LayoutParams to android.support.v4.widget.DrawerLayout$LayoutParams
- Call Audio Stream Modification in Android 4.0 ICS
- StartActivityForResults always returns RESULT_CANCELLED for Intent.ACTION_SEND
- Android “Hello, MapView” Tutorial – Map Tiles Do Not Load
- Full example of how to programmatically do RotateAnimations?
- How to pick image for crop from camera or gallery in Android 7.0?
- replace layout on orientation change