You cannot change UI elements from a non-UI thread. Try using runOnUiThread.
runOnUiThread(new Runnable(){
@Override
public void run(){
// change UI elements here
}
});
More Related Contents:
- How to make some text clickable in android? [duplicate]
- What is the difference between “px”, “dip”, “dp” and “sp”?
- How to change the background color of the options menu?
- How to crop circular area from bitmap in Android
- How do I display the current value of an Android Preference in the Preference summary?
- Choose File Dialog [closed]
- Grid of images inside ScrollView
- How to style PopupMenu?
- Android ViewPager with bottom dots
- Navigation Drawer (Google+ vs. YouTube)
- How can I check if a view is visible or not in Android? [duplicate]
- How to center icon and text in a android button with width set to “fill parent”
- How to get the fragment instance from the FragmentActivity?
- Android – Way to appear bordered text on the TextView?
- Implement double click for button in Android
- creating a strikethrough text?
- Is it possible to put a ConstraintLayout inside a ScrollView?
- Custom title bar without padding (Android)
- HorizontalScrollView: auto-scroll to end when new Views are added?
- Why should we use sp for font sizes in Android? [duplicate]
- How can I change the OverScroll color in Android 2.3.1?
- Android 4.2 on Nexus 7: canvas.drawText() not working correctly
- Android – Back button in the title bar
- How can I improve the look and feel of an Android app?
- Error when adding buildFeatures in build.gradle file
- Multiple choice list with custom view?
- Android Activity with no GUI
- Multi-State Toggle Button
- Change the side the text appears on a radio button
- Horizontal “tab”ish scroll between views