OSDN Git Service

Combine settings suggestion and condition.
authorDoris Ling <dling@google.com>
Thu, 11 May 2017 23:27:54 +0000 (16:27 -0700)
committerDoris Ling <dling@google.com>
Fri, 2 Jun 2017 21:59:48 +0000 (14:59 -0700)
commit83a6621b38457a517bc842dc6df902ad8a370adf
treef4686ff4c0546de24c965a9b2c11e5ee0cdc69b3
parent52c031edae302be8e945f94ae28b26b76fbaab5a
Combine settings suggestion and condition.

- Add a flag in dashboard feature provider to specify whether to use the
combined UI for suggestions and conditions.
- Move Conditions below Suggestions.
- Add dashboard entity for condition and suggestion container, and
  wrap the condition and suggestion list inside the container. The
  container itself will be a single dashboard item, and within it will
  be the list of suggestion or condition.
- Add suggestion/condition header that will show the combined info for
  the conditions and suggestion data, and have the expand button to
  control expanding both the suggestion and condition list.
- Change the individual condition card to be always expanded, and
remove the logic to collapse/expand individual condition card.
- Remove the divider between the action button and condition detail
  within each condition card.
- Add suggestion/condition footer for collapsing the whole suggestion and
  condition list.

Bug: 37645754
Test: make RunSettingsRoboTests
Change-Id: I86df75f7e4551778f79d730851c03121fd0dcbdf
23 files changed:
res/layout/condition_header_icon.xml [new file with mode: 0644]
res/layout/condition_tile_new_ui.xml [new file with mode: 0644]
res/layout/horizontal_divider.xml [new file with mode: 0644]
res/layout/suggestion_condition_container.xml [new file with mode: 0644]
res/layout/suggestion_condition_footer.xml [new file with mode: 0644]
res/layout/suggestion_condition_header.xml [new file with mode: 0644]
res/layout/suggestion_tile_new_ui.xml [new file with mode: 0644]
res/values/strings.xml
res/values/styles.xml
src/com/android/settings/dashboard/DashboardAdapter.java
src/com/android/settings/dashboard/DashboardData.java
src/com/android/settings/dashboard/DashboardFeatureProvider.java
src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
src/com/android/settings/dashboard/DashboardSummary.java
src/com/android/settings/dashboard/conditional/ConditionAdapter.java [new file with mode: 0644]
src/com/android/settings/dashboard/conditional/ConditionAdapterUtils.java
src/com/android/settings/dashboard/suggestions/SuggestionAdapter.java [new file with mode: 0644]
src/com/android/settings/dashboard/suggestions/SuggestionDismissController.java
tests/robotests/src/com/android/settings/conditional/ConditionAdapterUtilsTest.java
tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
tests/robotests/src/com/android/settings/dashboard/DashboardDataTest.java
tests/robotests/src/com/android/settings/dashboard/conditional/ConditionAdapterTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionAdapterTest.java [new file with mode: 0644]