do not allow clicking bottom actions if faded away
This commit is contained in:
parent
e6980596a2
commit
3a7e93f095
2 changed files with 14 additions and 6 deletions
|
@ -182,13 +182,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
bottom_delete.beGone()
|
bottom_delete.beGone()
|
||||||
|
|
||||||
bottom_edit.setOnClickListener {
|
bottom_edit.setOnClickListener {
|
||||||
if (mUri != null) {
|
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||||
openEditor(mUri!!.toString())
|
openEditor(mUri!!.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom_share.setOnClickListener {
|
bottom_share.setOnClickListener {
|
||||||
if (mUri != null) {
|
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||||
sharePath(mUri!!.toString())
|
sharePath(mUri!!.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -762,19 +762,27 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun initBottomActionButtons() {
|
private fun initBottomActionButtons() {
|
||||||
bottom_favorite.setOnClickListener {
|
bottom_favorite.setOnClickListener {
|
||||||
toggleFavorite()
|
if (bottom_actions.alpha == 1f) {
|
||||||
|
toggleFavorite()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom_edit.setOnClickListener {
|
bottom_edit.setOnClickListener {
|
||||||
openEditor(getCurrentPath())
|
if (bottom_actions.alpha == 1f) {
|
||||||
|
openEditor(getCurrentPath())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom_share.setOnClickListener {
|
bottom_share.setOnClickListener {
|
||||||
shareMediumPath(getCurrentPath())
|
if (bottom_actions.alpha == 1f) {
|
||||||
|
shareMediumPath(getCurrentPath())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom_delete.setOnClickListener {
|
bottom_delete.setOnClickListener {
|
||||||
checkDeleteConfirmation()
|
if (bottom_actions.alpha == 1f) {
|
||||||
|
checkDeleteConfirmation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue