Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Switch with mappings' icon misplaced #3773

Closed
maniac103 opened this issue Jul 19, 2024 · 3 comments · Fixed by #3787
Closed

'Switch with mappings' icon misplaced #3773

maniac103 opened this issue Jul 19, 2024 · 3 comments · Fixed by #3787
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@maniac103
Copy link
Contributor

See screenshot from demo server:
Screenshot_20240719-191043

@maniac103 maniac103 added the bug Indicates an unexpected problem or unintended behavior label Jul 19, 2024
@mueller-ma
Copy link
Member

I cannot reproduce this issue. Which Android version and which device do you have?

@maniac103
Copy link
Contributor Author

Pixel 8 / Android 14. I just tried it again, it's still the same (with 3.15.4 that is). I can also have a look into it myself when I get some time allocated.

@lehanspb
Copy link

Same issue
app version 3.15.5
Samsung Galaxy S22
Android 14

maniac103 added a commit to maniac103/openhab.android that referenced this issue Jul 29, 2024
The way View.createSkeleton() works doesn't play nicely with
ConstraintLayout as it causes constraints to be lost, thus insert a
wrapper view to keep the constraints intact.

Fixes openhab#3773

Signed-off-by: Danny Baumann <dannybaumann@web.de>
maniac103 added a commit to maniac103/openhab.android that referenced this issue Jul 30, 2024
The 'automagic' skeleton addition caused two issues:
- Misplaced icon in section switches (openhab#3773)
  This was caused by constraints in the widget's ConstraintLayout
  referencing the WidgetImageView's ID, which was no longer present
  after replacing it by the SkeletonLayout
- Skeleton and image shown at the same time (mentioned in openhab#3786)
  This was caused by WidgetAdapter and SkeletonLayout both
  simultaneously modifying the visibility flag of the WidgetImageView,
  again caused by silent replacement of WidgetImageView by
  SkeletonLayout

Fix both issues by changing the approach: Instead of silently replacing
the view, make WidgetImageView inherit from SkeletonLayout and make it
redirect external calls to an internal ImageView instance.

Fixes openhab#3773, openhab#3786

Signed-off-by: Danny Baumann <dannybaumann@web.de>
mueller-ma pushed a commit that referenced this issue Jul 30, 2024
The 'automagic' skeleton addition caused two issues:
- Misplaced icon in section switches (#3773)
  This was caused by constraints in the widget's ConstraintLayout
  referencing the WidgetImageView's ID, which was no longer present
  after replacing it by the SkeletonLayout
- Skeleton and image shown at the same time (mentioned in #3786)
  This was caused by WidgetAdapter and SkeletonLayout both
  simultaneously modifying the visibility flag of the WidgetImageView,
  again caused by silent replacement of WidgetImageView by
  SkeletonLayout

Fix both issues by changing the approach: Instead of silently replacing
the view, make WidgetImageView inherit from SkeletonLayout and make it
redirect external calls to an internal ImageView instance.

Fixes #3773, #3786

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants