Android Sync encryption dialog: fix the scrolling

The dialog contains a ListView of encryption options, and an explanatory
text (with a "reset sync" link) below it.
Before this CL, if there was insufficient screen space to fit
everything, then the text could get pushed offscreen and become
inaccessible, because only the ListView was scrollable (see bug).
This CL moves the explanatory text into the ListView as a footer. This
way, it is part of the scrollable area and thus remains accessible even
if not everything fits on screen at once.

Two small changes were necessary to make things work:
- The text view now needs to be created dynamically, since it's not
  possible to set a footer view in xml.
- ListView does not support margins on its elements, so we use padding

Bug: 911635
Change-Id: Ida64735ae571fd9d4d9b1dd3e5650a322d81207f
Commit-Queue: Marc Treib <>
Reviewed-by: Florian Uunk <>
Reviewed-by: Matthew Jones <>
Reviewed-by: Mikel Astiz <>
Cr-Commit-Position: refs/heads/master@{#614679}
4 files changed