|
@@ -7,7 +7,7 @@ import android.util.AttributeSet;
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
import com.zhpan.bannerview.indicator.drawer.BaseDrawer;
|
|
|
-import com.zhpan.bannerview.indicator.drawer.DrawerController;
|
|
|
+import com.zhpan.bannerview.indicator.drawer.DrawerProxy;
|
|
|
import com.zhpan.bannerview.manager.IndicatorOptions;
|
|
|
|
|
|
/**
|
|
@@ -20,7 +20,7 @@ import com.zhpan.bannerview.manager.IndicatorOptions;
|
|
|
*/
|
|
|
public class IndicatorView extends BaseIndicatorView implements IIndicator {
|
|
|
|
|
|
- private DrawerController mDrawerController;
|
|
|
+ private DrawerProxy mDrawerProxy;
|
|
|
|
|
|
public IndicatorView(Context context) {
|
|
|
this(context, null);
|
|
@@ -32,25 +32,25 @@ public class IndicatorView extends BaseIndicatorView implements IIndicator {
|
|
|
|
|
|
public IndicatorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
|
|
super(context, attrs, defStyleAttr);
|
|
|
- mDrawerController = new DrawerController(getIndicatorOptions());
|
|
|
+ mDrawerProxy = new DrawerProxy(getIndicatorOptions());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
|
- BaseDrawer.MeasureResult measureResult = mDrawerController.measure(widthMeasureSpec, heightMeasureSpec);
|
|
|
+ BaseDrawer.MeasureResult measureResult = mDrawerProxy.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
|
|
setMeasuredDimension(measureResult.getMeasureWidth(), measureResult.getMeasureHeight());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void setIndicatorOptions(IndicatorOptions indicatorOptions) {
|
|
|
super.setIndicatorOptions(indicatorOptions);
|
|
|
- mDrawerController.setIndicatorOptions(indicatorOptions);
|
|
|
+ mDrawerProxy.setIndicatorOptions(indicatorOptions);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onDraw(Canvas canvas) {
|
|
|
super.onDraw(canvas);
|
|
|
- mDrawerController.draw(canvas);
|
|
|
+ mDrawerProxy.onDraw(canvas);
|
|
|
}
|
|
|
}
|