Comments (22)
from expansionpanel.
so, add id on it ?
from expansionpanel.
and this doesn't work.
from expansionpanel.
check in you example app. Headers and layouts with id but when screen rotate layout is back to initial state...
from expansionpanel.
I added this into 1.0.9
can you try ?
from expansionpanel.
its partially work, after rotating expanded state is saved but then can't collapse view
from expansionpanel.
expansionLayout is null after call setup() from onRestoreInstanceState(...)
from expansionpanel.
from expansionpanel.
Problem with the call to restore super state. I fix this with extends View.BaseSavedState. But found another bug, when header use identical id's in View or RecuclerView, in this case, state is single for all headers.
from expansionpanel.
from expansionpanel.
from expansionpanel.
from expansionpanel.
for RecyclerView this is important
from expansionpanel.
you've got an idea how to fix it ?
from expansionpanel.
because on RecyclerView, each view can have same ids
from expansionpanel.
currently, no...
from expansionpanel.
Can you release latest fixes?
from expansionpanel.
from expansionpanel.
from expansionpanel.
How can we fix this in recyclerview? If i expand several panels, press the home button and come back, everything is reset
from expansionpanel.
I think that for the recyclerview it is best to implement something like this:
In Recyclerview the following article can be adapted
Android: Handling Checkbox state in Recycler Views.
Use SparseBooleanArray
for save state each expandable state
private SparseBooleanArray itemStateArray= new SparseBooleanArray();
Detect expandable state in Viewholder
expansionLayout.addListener(new ExpansionLayout.Listener() {
@Override
public void onExpansionChanged(ExpansionLayout expansionLayout, boolean expanded) {
itemStateArray.put(adapterPosition, true);
}
});
from expansionpanel.
https://stackoverflow.com/questions/35424232/issue-refreshing-a-view-of-a-row-in-recyclerview?rq=1
This may help to avoid recreating all views and your state will not be changed. You can update only specific view that you need.
from expansionpanel.
Related Issues (20)
- app:expansion_openOnlyOne="true" 没有效果,咋办呀?
- scroll to bottom : when click on ExpansionLayout
- Manifest error After add to project HOT 1
- NestedScrollView isn't scolling when start scrolling on ExpansionHeader (the scroll event isn't triggered)
- problem with expansion panel in recyclerview HOT 3
- Expand upward
- Expandblelayout won`t take as much place as it should take
- Remove listener when used in adapter
- Add an option to not set click listener on the header by default HOT 1
- ExpansionPanel problem in recyclerview
- Change expansion and collapse image on ExpansionHeader? HOT 1
- is it possible to perform click listener header_indication?
- [BUG] Broken in RecyclerView+SwipeRefreshLayout HOT 2
- CollapseAll
- onSaveInstanceState don't save the state of ExpansionLayout HOT 1
- Expension panel
- Arrow content
- Moving to MavenCentral HOT 3
- Cutting content when expanding
- ExpansionLayout content is scrolled, how can I turn it off? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expansionpanel.