/** 设置banner的数据 */ public void setAdapter(BaseBannerAdapter adapter) { if (adapter == null) { throw new RuntimeException("adapter must not be null"); } if (mAdapter != null) { throw new RuntimeException("you have already set an Adapter"); } this.mAdapter = adapter; mAdapter.setOnDataChangedListener(this); setupAdapter(); }