Ejemplo n.º 1
0
  /** Set DEFAULT_COLOR for color value if you don't want to change it */
  public void setIndicatorColor(int selectedIndicatorColor, int unselectedIndicatorColor) {
    this.selectedIndicatorColor = selectedIndicatorColor;
    this.unselectedIndicatorColor = unselectedIndicatorColor;

    if (mController != null) {
      if (selectedIndicatorColor != DEFAULT_COLOR)
        mController.setSelectedIndicatorColor(selectedIndicatorColor);
      if (unselectedIndicatorColor != DEFAULT_COLOR)
        mController.setUnselectedIndicatorColor(unselectedIndicatorColor);
    }
  }
Ejemplo n.º 2
0
  private void initController() {
    if (mController == null) mController = new DefaultIndicatorController();

    FrameLayout indicatorContainer = (FrameLayout) findViewById(R.id.indicator_container);
    indicatorContainer.addView(mController.newInstance(this));

    mController.initialize(slidesNumber);
    if (selectedIndicatorColor != DEFAULT_COLOR)
      mController.setSelectedIndicatorColor(selectedIndicatorColor);
    if (unselectedIndicatorColor != DEFAULT_COLOR)
      mController.setUnselectedIndicatorColor(unselectedIndicatorColor);
  }