Closed moertel closed 1 year ago
Heads-up: the info icon bit is yielding occasional fatals. Not for all users, just some. Investigating.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setVisibility(int)' on a null object reference
at candybar.lib.adapters.RequestAdapter.onBindViewHolder(RequestAdapter.java:200)
I forgot to update the layout files for landscape and sw600dp. Fixed!
This commit follows the discussion in https://github.com/zixpo/candybar/discussions/133 and makes more options available to the FilterRequestHandler. In addition to the return value of true/false which completely hides apps from the icon request section, the new methods
setAvailableForRequest()
andsetInfoText()
allow to arbitrarily annotate and disable icons as follows:When
setInfoText()
sets a non-empty string, a little(i)
icon will be displayed and upon tapping it, a dialog withinfoText
pops up.When
setAvailableForRequest()
is set tofalse
, the entire item will be greyed out. When tapping it, nothing happens. UnlesssetInfoText()
is used as well, in which case a dialog with theinfoText
pops up.This allows for flexible combinations of selectively hiding, greying out, or just annotating icons based on matched patterns.