Handler Looper in Android Kotlin
Handler(Looper.getMainLooper()).postDelayed(
{
Myview.swiperefreshLayout.isRefreshing=false
},
500
)
Fragment Manager Change Fragment in Android Kotlin
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.framelayout, Topics())
transaction.addToBackStack(null)
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
transaction.commit()
R.id.framelayout is the FrameLayout that holds the fragment and Topics( ) is the new Fragment( ).
0 Comments
If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.