Discussion:
Can't get import / export view correct for all screen sizes
(too old to reply)
Johan Wevers
2017-03-18 10:37:28 UTC
Permalink
Raw Message
Hello,

I have put encrypted backupand restore back in Signal and am running a
self built version. This works, but since the layout changes in 4.0 I
can;'t get the layout good for all screen sizes and I have no idea how
to fix this, I'm clearly missing knowledge about these layout elements.

When I just put in the extra LinearLayout elements for encrypted backup
/ restore the header element is not shown on small screens and only half
on a little larger screen. Further I see a large empty space at the
bottom. I have now added a line

android:layout_marginTop="160dp"

in the upper cardview, and this soles the issue on the small screen, but
on a larger screen I nowget too much extra space.

My changed version of import_export_fragment.xml is on
https://mega.nz/#!hURVERwJ!rUsRx0yBn9pfpZNKFTL4UU-mE2YnWaa_1ln3_CChzLQ,
and all changes I made are in
https://mega.nz/#!5cBm1AgQ!seCCucUBTQrn9lwp3xrLFD-5OCd-yEhDSKypx1BYyY0 .
Does anyone have an idea what I did wrong, and why just adding the
elements didn't work nicely?
--
Met vriendelijke groet,

Johan Wevers
Johan Wevers
2017-03-20 18:52:01 UTC
Permalink
Raw Message
I have put encrypted backup and restore back in Signal and am running a
self built version. This works, but since the layout changes in 4.0 I
can't get the layout good for all screen sizes and I have no idea how
to fix this, I'm clearly missing knowledge about these layout elements.
OK, I fixed it, it was so easy that I should have seen it earlier: just
replace

android:gravity="center_vertical"
android:layout_gravity="center_vertical"

into

android:gravity="top"
android:layout_gravity="top"

in the topmost LinearLayout.
--
Met vriendelijke groet,

Johan Wevers
Loading...