Пример #1
0
  void addMarker(int index, PageMarkerResources marker, boolean allowAnimations) {
    index = Math.max(0, Math.min(index, mMarkers.size()));

    PageIndicatorMarker m =
        (PageIndicatorMarker) mLayoutInflater.inflate(R.layout.page_indicator_marker, this, false);
    m.setMarkerDrawables(marker.activeId, marker.inactiveId);

    mMarkers.add(index, m);
    offsetWindowCenterTo(mActiveMarkerIndex, allowAnimations);
  }
Пример #2
0
 void updateMarker(int index, PageMarkerResources marker) {
   PageIndicatorMarker m = mMarkers.get(index);
   m.setMarkerDrawables(marker.activeId, marker.inactiveId);
 }