|
|
@@ -1,6 +1,7 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.custom.category.banner;
|
|
|
|
|
|
import android.content.Context;
|
|
|
+import android.support.annotation.ColorRes;
|
|
|
import android.support.constraint.ConstraintLayout;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
@@ -46,7 +47,9 @@ public class MainBannerView extends ConstraintLayout {
|
|
|
super(context, attrs, defStyleAttr);
|
|
|
}
|
|
|
|
|
|
- public void init(Context context, List<? extends IImageTitleBean> textImageBeanList, IEventListener listener, boolean isDimLayerEnabled) {
|
|
|
+ public void init(Context context, List<? extends IImageTitleBean> textImageBeanList,
|
|
|
+ IEventListener listener, boolean isDimLayerEnabled,
|
|
|
+ @ColorRes int activeColor, @ColorRes int inActiveColor) {
|
|
|
|
|
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
view = inflater.inflate(R.layout.main_banner_view, this);
|
|
|
@@ -64,7 +67,7 @@ public class MainBannerView extends ConstraintLayout {
|
|
|
}
|
|
|
};
|
|
|
recyclerView.setLayoutManager(layoutManager);
|
|
|
- customIndicator.setIndicator(recyclerView, R.color.C4DFFFFFF, R.color.CFFFFFF, event -> {
|
|
|
+ customIndicator.setIndicator(recyclerView, activeColor, inActiveColor, event -> {
|
|
|
recyclerView.smoothScrollToPosition(event.getIndex());
|
|
|
});
|
|
|
|