Reputation: 3044
I can make it invisible using the code below, but can't disable it.
RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.notification);
contentView.setViewVisibility(R.id.buttonToDisable, View.INVISIBLE);
Upvotes: 1
Views: 1444
Reputation: 2310
no dice trying to update remote view ind. components e.g.:
Button can't use method with RemoteViews: setEnabled(boolean)
try switching out the layout
if(((WzBlockWordTheme) wzTheme).mForeign) {
newRemoteViews = new RemoteViews(context.getPackageName(), R.layout.german_clock_wordzoo_vocabr);
}
else {
newRemoteViews = new RemoteViews(context.getPackageName(), R.layout.german_clock_wordzoo_vocabr_wait);
}
Upvotes: 0
Reputation: 1007494
setEnabled()
is a @RemotableViewMethod
, at least on the now-current master
branch of the source code. Hence, you should be able to use setBoolean()
:
contentView.setBoolean(R.id.buttonToDisable, "setEnabled", false);
Upvotes: 10