I
I
Igor2015-01-10 21:51:21
Android
Igor, 2015-01-10 21:51:21

How to darken (fade) all View except one?

It is necessary to dim everything except the expanded View by opening in the ExpandedListView. How to darken (fade) all View except one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
one pavel, 2015-01-10
@onepavel

I would try this:
on the OnGroupExpandListener expansion event, we receive the position of the expanded group
onGroupExpand(int groupPosition). We pass GroupPosition to the adapter so that in getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) we darken everything except the passed GroupPosition
and call invalidateViews()
And in OnGroupCollapseListener we reset everything

V
Vadim Duran, 2015-01-13
@vadimduran

To darken the entire area, except for this view, you need to set the view style with parameters in style.xml:

<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowIsFloating">true</item>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question