Harteex / ExLauncher

Launcher for devices without mouse / keyboard
http://exlauncher.org
Other
6 stars 2 forks source link

Content size isn't updated properly on recalculated layout #6

Open Harteex opened 9 years ago

Harteex commented 9 years ago

If the parent of a view which is recalculating its layout has a fixed size (specified or match parent), it will not be updated. The problem with this is that the contentsize of that view isn't updated.

This can be solved by either:

  1. Recalculate layout of any parent having a child with wrap_content
  2. Ignore contentSize completely for views that has a fixed size or those that match the parent.

This bug can be triggered by loading contentsizebug.xml

Harteex commented 9 years ago

The contentSize must probably be known, since it would be used for scrollbars as well. So we might have to recalculate the layout one view higher up in the hierarchy.

Harteex commented 9 years ago

Another option would be to remove contentSize from View. It's not really needed as long as OnLayoutChange returns contentSize.

Then move it to CollectionView instead, in support for scroll handling.