1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-01-23 05:21:49 +01:00

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

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