- 博客(0)
- 资源 (2)
空空如也
IndicatorView轮播图的自定义点
private void initIndicator() {
RelativeLayout mHeader = (RelativeLayout) findViewById(R.id.launch_head);
mIndicator = new IndicatorView(UIUtils.getContext());
//设置点和点之间的间隙
mIndicator.setInterval(10);
//设置点的图片
mIndicator.setIndicatorDrawable(UIUtils.getDrawable(R.drawable.indicator));
RelativeLayout.LayoutParams rl = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
rl.addRule(RelativeLayout.CENTER_HORIZONTAL);
rl.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
rl.setMargins(0, 0, 0, UIUtils.dip2px(15));
mIndicator.setLayoutParams(rl);
mIndicator.setCount(4);
mIndicator.setSelection(0);
mHeader.addView(mIndicator);
}
2015-09-11
ListView等事件冲突
可随手指滑动的相对布局,用scroller控制,可拦截ListView,GridView等滑动事件,可单独处理左右和上下的滑动
* 注:滑动的是子View,即内容,而不是布局本身
2015-09-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人