daniveler
daniveler

Reputation: 1

Function being called twice in runOnUiThread Android Studio java

I have a JavascriptInterface that calls a function to draw in a layout. This function needs to be run on the UI Thread. I don't know why, but it is always called twice, making my app fail. Can someone help me?

@JavascriptInterface
        public void cambiarIdioma(String idIdioma)
        {
            runOnUiThread(new Runnable()
            {
                @Override
                public void run()
                {
                    setupTabLayout(Integer.parseInt(idIdioma),false);
                }
            });
        }

Upvotes: 0

Views: 215

Answers (0)

Related Questions