[fenix] For https://github.com/mozilla-mobile/fenix/issues/2570: Hide 3-dots menu for all library items when in select mode (https://github.com/mozilla-mobile/fenix/pull/5699)
Removed items from RecyclerView cache to allow setting the new visibility Disabled hidden buttons, otherwise they could still be clickedpull/600/head
parent
05b2e94dcf
commit
6875fa017a
@ -0,0 +1,18 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.ext
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageButton
|
||||
|
||||
fun ImageButton.hideAndDisable() {
|
||||
this.visibility = View.INVISIBLE
|
||||
this.isEnabled = false
|
||||
}
|
||||
|
||||
fun ImageButton.showAndEnable() {
|
||||
this.visibility = View.VISIBLE
|
||||
this.isEnabled = true
|
||||
}
|
Loading…
Reference in New Issue