show fab button only when shared pref is true. #652

This commit is contained in:
Daniel Bälz 2016-12-21 22:15:58 +01:00
parent 782c525ba9
commit 037bca804e
1 changed files with 6 additions and 0 deletions

View File

@ -354,6 +354,12 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
drawerToggleButton.visibility = View.GONE
}
if (preferences.getBoolean(SharedPreferenceConstants.KEY_FAB_VISIBLE)) {
actionsButton.visibility = View.VISIBLE
} else {
actionsButton.visibility = View.GONE
}
homeContent.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom ->
if (top != oldTop) {
val fragment = leftDrawerFragment