Updating the folder page indicator to be more like the

framework page indicator (used in quick settings)

The active page is indicated with the accent color. During scroll
the active indicator expands to 2 dots corresponding to the visible pages.

Change-Id: Iaf57836b642cf87e5eed98048ecca7dd8e7643a4
This commit is contained in:
Sunny Goyal
2016-05-18 14:12:02 -07:00
parent 770217c697
commit c64cfdd8fa
27 changed files with 341 additions and 478 deletions

View File

@@ -6,26 +6,11 @@ import java.util.ArrayList;
public interface PageIndicator {
View getView();
void setProgress(float progress);
void setScroll(int currentScroll, int totalScroll);
void removeAllMarkers(boolean allowAnimations);
void addMarkers(ArrayList<PageMarkerResources> markers, boolean allowAnimations);
void setActiveMarker(int activePage);
void addMarker(int pageIndex, PageMarkerResources pageIndicatorMarker, boolean allowAnimations);
void removeMarker(int pageIndex, boolean allowAnimations);
void updateMarker(int pageIndex, PageMarkerResources pageIndicatorMarker);
/**
* Contains two resource ids for each page indicator marker (e.g. dots):
* one for when the page is active and one for when the page is inactive.
*/
class PageMarkerResources {
int activeId;
int inactiveId;
public PageMarkerResources(int aId, int iaId) {
activeId = aId;
inactiveId = iaId;
}
}
void addMarker();
void removeMarker();
void setMarkersCount(int numMarkers);
}