Skip to content Skip to sidebar Skip to footer

How To Solve The Error : Only The Original Thread That Created A View Hierarchy Can Touch Its Views

I'm not really familiar with the concept of threads , but I got this error showing up each time I'm trying to display my RecyclerView : Only the original thread that created a

Solution 1:

You need to put your code that updates the UI in the UI thread:

runOnUiThread(new Runnable() {
@Override
public void run() {
    //your code here to update UI    
    }
});

Post a Comment for "How To Solve The Error : Only The Original Thread That Created A View Hierarchy Can Touch Its Views"