Comments (4)
If you want to use the proposed fix, I would be happy to provide a PR.
from expandablelayout.
Thank you for a polite reporting. 👍
I know this method which is getMeasuredHeight()
and getMeasuredWidth()
.
But these don't work as I expect to.
- your question
Or is there any reason why you have to calculate it on your own ?
I want to create ExpandableRelativeLayout.move()
and ExpandableRelativeLayout.moveChild()
.
So, I calculate the height and width in onMeasure()
.
And my library seems to work.
I pushed the test branch.
Is this correct code implemented your explaining?
Please check it if my code is wrong.
https://github.com/AAkira/ExpandableLayout/compare/feature/test?expand=1
from expandablelayout.
@AAkira
You're welcome, nothing is more annoying than a bad bug report.
Ahh, now i see why they are necessary.
Acutally I think now that my "Bug" might be some misunderstanding in the usage of the libary.
As reported (I used some wrong Markdown now it's visible) I was putting inside your Layout 3 Child views, which were aligned next to each other. (android:layout_toRightOf="@id/someId"
)
The orientation of the ExpandableRelativeLayout
was vertical.
In your logic those 3 elements were 3 different children and since orientation was vertical you wanted to provide me the ability to move them (upwards or downwards).
Therefore you calculated the layout as if they were all beneath each other and when I did expand it, it had a height, which was too high.
For me though, these 3 childs were logically 1 Child (1 row). I didn't want them to move. I guess for my use case you really have to put those 3 children into 1 Layout.
Nevertheless I'm gonna show you my use case in the test branch, I currently don't have that much time, hope I'll be able to do it tomorrow.
Some possible options which come to my mind:
- Check in your calculation also the alignment and take it into account (along with the height calculated by the RelativeLayout)
or : - Make in your Readme the concept more clear (Everything which is for the user one logic row has to be put inside a layout)
from expandablelayout.
I opened a PR, you can have a look at it.
Here are some screenshots to the issue.
This is the layout colaapsed, the pink view is some other content beneath.
This is the layout expanded, as you can see the white space is wrong here.
It has exactly the size of the blue text view.
And finally here is the Log to the "wrong" height calculation.
As already stated I think it's not really a "bug" but rather a case where you have to take special steps (Wrap the views for a logic row in one layout --> Then it will be 1 child for your layout as well)
from expandablelayout.
Related Issues (20)
- Very nice
- Option onClick
- How collapse when activity viewed? HOT 1
- Collapse at certain height? HOT 1
- Recyclerview collapse mode : Unwanted negative space HOT 1
- Change the arrow icon
- Measured height for programatically added view is larger than actual size
- expand issue HOT 6
- Expandable Relative Layout not shows data in recyclerView got from server HOT 1
- After update 27 api its not supporting, what is another solutions?
- app get crashed when i add more than 5 elements in recycler view
- After changing one of children's visibility ExpandableLinearLayout is not resized
- Expand single child at a time in Expandable Linear Layout
- Expandable ExpandedLinearLayout object height HOT 1
- expand and collapse does not work in android 9 HOT 1
- IllegalStateException: at com.github.aakira.expandablelayout.ExpandableLinearLayout.onMeasure (ExpandableLinearLayout.java:140) HOT 2
- ExpandableLinearLayout in recycler view affects animations HOT 1
- Expand issue
- JCenter is at end of life
- JCenter replacement
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 expandablelayout.