SHARE
TWEET

Untitled

a guest May 23rd, 2019 71 in 3 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private fun updateTabBackgroundDrawable(tabLayout: TabLayout) {
  2.         try {
  3.             val method = tabLayout.javaClass.getDeclaredMethod("updateBackgroundDrawable", Context::class.java)
  4.             method.isAccessible = true
  5.             method.invoke(tabLayout, context)
  6.         } catch (ex: Exception) {
  7.             when (ex) {
  8.                 NoSuchFieldException::class,
  9.                 IllegalAccessException::class -> ex.printStackTrace()
  10.                 else -> ex.printStackTrace()
  11.             }
  12.         }
  13.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top