DescriptionChange the CBD dialog on Android to a PreferenceFragment
According to the mocks (https://folio.googleplex.com/clear-browsing-data/Dialog%20-%20Android/V1#%2F00%20-%20Default%20Selection.png), the CBD dialog should look like a standard preferences page.
Therefore, in this CL, we:
1. Make ClearBrowsingDataDialogFragment inherit from PreferencesFragment instead of DialogFragment
2. Following that change, replace CheckedTextView with CheckboxPreference, Button with ButtonPreference etc.
3. The dialog layout is now defined in an XML file instead of being generating through an Adapter.
4. Every ClearBrowsingDataDialogFragment.Item now corresponds to a CheckboxPreference, and thus it can delegate most of its logic (e.g. checked state, enabled state etc.) to that CheckboxPreference.
Furthermore, to match the mocks, we:
5. Change the support string at the bottom of the dialog according to the mocks, and add a "Learn more" link.
What is still different from the mocks and will be done in followup CLs (as they require separate Preference subclasses):
6. The time range combobox is not yet added
7. The support string is not of the correct color.
8. CheckboxPreference-s still have 1px border on top and bottom.
BUG=569870
Committed: https://crrev.com/910dffdd8810791e3627fad75a318c14022d7e76
Cr-Commit-Position: refs/heads/master@{#373203}
Patch Set 1 : #Patch Set 2 : Fixed tests. #Patch Set 3 : Fixed tests (2nd try?) #Patch Set 4 : Tests (3rd attempt) #Patch Set 5 : Removed button, fixed tests #
Total comments: 4
Patch Set 6 : Unused variable. #
Total comments: 31
Patch Set 7 : Rebase #Patch Set 8 : Addressed most comments. #Patch Set 9 : Renaming. #Messages
Total messages: 22 (9 generated)
|