Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为了方便kotlin下的使用,修改ConvenientBanner中的泛型 #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*
* @author Sai 支持自动翻页
*/
public class ConvenientBanner<T> extends RelativeLayout {
private List<T> mDatas;
public class ConvenientBanner extends RelativeLayout {
private List mDatas;
private int[] page_indicatorId;
private ArrayList<ImageView> mPointViews = new ArrayList<ImageView>();
private CBPageAdapter pageAdapter;
Expand Down Expand Up @@ -85,7 +85,7 @@ public ConvenientBanner setLayoutManager(RecyclerView.LayoutManager layoutManage
viewPager.setLayoutManager(layoutManager);
return this;
}
public ConvenientBanner setPages(CBViewHolderCreator holderCreator, List<T> datas) {
public <T> ConvenientBanner setPages(CBViewHolderCreator holderCreator, List<T> datas) {
this.mDatas = datas;
pageAdapter = new CBPageAdapter(holderCreator, mDatas, canLoop);
viewPager.setAdapter(pageAdapter);
Expand Down