| Summary: | Change Android Layout from Absolute to Linear or Relative | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Gabriel Jacobo <gabomdq> |
| Component: | video | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
| Attachments: | patch for using RelativeLayout on Android | ||
|
Description
Gabriel Jacobo
2013-11-06 14:32:55 UTC
Created attachment 1470 [details]
patch for using RelativeLayout on Android
I added a patch with AbsoluteLayout changed to RelativeLayout. For me it looks the same but I have not tried it on lots of devices.
Cool, can you add the keyboard presence detection logic like we discussed in #1639 ? (In reply to Gabriel Jacobo from comment #2) > Cool, can you add the keyboard presence detection logic like we discussed in > #1639 ? If you think of the onMeasure() workaround then I currently prefer not to implement it myself. For me it looks very fragile and I do not fully understand it which means I may mess it up. I do not want to just copy source from stackoverflow.com and hope for the best. As far as I can tell RelativeLayout is no requirement for this workaround. If android:windowSoftInputMode="adjustResize" is added to AndroidManifest.xml AbsoluteLayout and RelativeLayout resize if the screen keyboard is shown. onMeasure() is called then but also if the device is rotated. Sometimes it is called more than once which I think may confuse the heuristic (what this workaround is). In my opinion AbsoluteLayout may be replaced with RelativeLayout because AbsoluteLayout it is deprecated. Also some SDL users seem to replace it in their applications anyway because it does not work correctly with ads or so they want display. This patch is now: https://hg.libsdl.org/SDL/rev/1b5a21b3fa97 |