Haven't found a successful way to remove a view from a StackView Widget. I'm working off of the basic StackView example that comes with the SDK.
Here's what I'm trying to do in the getViewAt(int position) function to a certain view that I do not want to display in the widget in a certain situation:
rv.removeAllViews(R.id.widget_item);
mWidgetItems.remove(position);
mCount = mCount -1;
AppWidgetManager awm = AppWidgetManager.getInstance(mContext);
awm.notifyAppWidgetViewDataChanged(awm.getAppWidgetIds(new ComponentName(mContext, WidgetProvider.class)), R.id.widget_item);
I also tried
rv.setViewVisibility(R.id.widget_item, View.GONE);
instead of
rv.removeAllViews(R.id.image_frame);
Both of these will cause the view to be blank, but the view is still there. I can tell because when I flip through the StackView I see an empty position.