dongjunkun / bannerlayout Goto Github PK
View Code? Open in Web Editor NEW一款简洁实用的android广告栏
Home Page: http://www.jianshu.com/p/bf3bc1f2df5c
一款简洁实用的android广告栏
Home Page: http://www.jianshu.com/p/bf3bc1f2df5c
我setView显示divide by zero
您好,最近小弟看到这个库相当轻量简单,不好意思,有个问题想请教您,假若图档是从SD卡取得的话,可以用什么样的方式实做呢?
现在加载失败后,是一张空白图片,一般需要设置一张带产品logo的图片,希望作者考虑一下这个因素。我直接在BannerLayout中添加这两句,但是不起作用
Glide.with(getContext())
.load(res)
.placeholder(R.drawable.banner_place_holder)
.error(R.drawable.banner_place_holder)
.centerCrop().into(imageView);
如标题
Error:Execution failed for task ':app:processDebugResources'.
> Error: more than one library with package name 'com.yyydjk.library'
建议包名里加上库名
为什么我的小圆点是方形的呢?应该是圆形的啊,我的代码也没问题
无法正常显示 在 Header 里面 。
向某侧微滑时,松手时会向反方向滑动两个View
往左滑一点,然后会自动往右滑动一张。而不是恢复原来的样子
之前用的youth的轮播图片是完整的。
cardview的ripple也不行,不知道为什么
主页中有若干fragment,fragment中使用RecyclerView显示数据。将BannerLayout添加到RecyclerView中后,切换fragment,再切换回来,BannerLayout的第一次图片变换是瞬间完成的(没有动画)。而且如果切换fragment过程中BannerLayout正好在切换图片,再切回到原fragment。BannerLayout会卡在切换图片的一半直到切换下一张图片。
我用的是FragmentTabHost。
侧滑没有结束,连续点击会出现自动滑动问题。
disallowedNamespaces:
-
namespace: 'Symfony\Component\HttpFoundation\RequestStack'
message: 'pass Request via controller instead'
allowIn:
- tests/*
-
namespace: 'Assert*'
message: 'use Webmoz
@OverRide
public Object instantiateItem(ViewGroup container, int position) {
if (views.size() > 0) {
//position % view.size()是指虚拟的position会在[0,view.size())之间循环
View view = views.get(position % views.size());
if (container.equals(view.getParent())) {
container.removeView(view);
}
container.addView(view);
return view;
}
return null;
}
您好,我打断点打到container.addView(view);这句代码时直接跳转到return null;了然后app直接退出。不打断点事没事的。我不知道这是不是有什么隐患
快速往右滑动,点击banner,则自动向左滑动。代码看不出问题
How to set a scaleType in banner layout fitXY..Kindly help me
能否暴露一个获取页面翻动时的监听,以便获取当前位置
用了好久测试出来的,低网速模式下会闪退
java.lang.NumberFormatException: Attribute '?attr/colorPrimary' not found. Are you using the right theme?
看了源码,都没有重写OnMeasuer 方法
希望博主可以把Glide方法提出来。加载网络图片可以自己选择是glide fresco 或者volley。来减少引入的包。
另外希望博主可以暴露一个getViewPager方法来获取当前的viewPager对象。
数据源为空的时候需要在Banner的位置显示一张默认图,不需要滑动。
直接设置setViewUrls(null)不行,尝试过传入一个集合,里面add一条数据,发现同一张图在banner里可以无限左右滑动..发现在LoopPagerAdapter的getCount方法,return了一个INT_MAX,不知道是不是这里的原因?请问这个需求要怎么处理?
有时候会出现连续滚动两张图的bug,然后我排查了一下,原因可能是因为多次startAutoPlay引起的,你可以测试一下,点击按钮运行一次startAutoPlay();就会出现了,然后这个是解决方法:
/**
* 开始自动轮播
*/
public void startAutoPlay() {
if (isAutoPlay) {
stopAutoPlay();//这句是我加上的
handler.sendEmptyMessageDelayed(WHAT_AUTO_PLAY, autoPlayDuration);
}
}
应该在这个地方加上一句这个,然后就好了: )
顺便说一下,你这个很好使,谢谢么么哒嗯嘛强行怼你一下
比如在只有一个广告的时候,隐藏显示器,并且不能手动切换轮播图
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.