XWTabLayout.init(XWTabLayoutConfig.newBuilder(this)
.setXWTabLayoutLoader(new CustomTabLayoutLoader())
.build());
public class CustomTabLayoutLoader implements XWTabLayoutLoader {
@Override
public void load(Context context, ImageView view, String url) {
Glide.with(context)
.load(url)
.into(view);
}
}
public interface CustomTabEntity {
String getTabTitle();
@DrawableRes
int getTabSelectedIcon();
@DrawableRes
int getTabUnselectedIcon();
String getTabSelectUrl ();
String getTabUnSelectUrl ();
}
-
4.按照FlycoTabLayout的api进行相应的设置