Created
June 28, 2018 19:27
-
-
Save PauloLinhares09/66fad783f6d9eb4551664097a69f0c58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
collapsing_toolbar_layout.title = "Ronaldo Fenômeno" | |
collapsing_toolbar_layout.setExpandedTitleColor(resources.getColor(android.R.color.transparent)) | |
//Listener para escutar mudanças de estado da AppBarLayout | |
app_bar.addOnOffsetChangedListener(object : AppBarLayout.OnOffsetChangedListener{ | |
override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) { | |
if (verticalOffset == 0) | |
tv_title_article.visibility = View.VISIBLE | |
else | |
tv_title_article.visibility = View.INVISIBLE | |
} | |
}) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment