一个仿爱奇艺视频,腾讯视频,搜狐视频首页推荐位轮播图类库

2016-08-29 10:44:27 +08:00
 yuiop

请尊重分享成果,转载请注明出处:http://blog.csdn.net/hejjunlin/article/details/52327435

前言:本篇只是一个介绍这个一个类库,具体实现思路代码会下篇中进行分析出来,

仿爱奇艺视频,腾讯视频,搜狐视频首页推荐位轮播图

github 地址: https://github.com/hejunlin2013/SuperIndicator , 如果觉得还行,欢迎点个 star 。

##SuperIndicator

a superindicatorlibray for viewpager, banner

##效果图

SuperIndicator

##爱奇艺视频,腾讯视频,搜狐视频首页推荐位轮播图

##Gradle <font color="#FF6347">如果引用不到包,可以把 library 拷贝你的工程中,在 setting.gradle 中 include 下,也是一样。 </font>

dependencies {
    compile 'com.hejunlin.superindicatorlibray:1.0.2'
}

##Usage xml

<com.hejunlin.superindicatorlibray.CircleIndicator
        android:id="@id/indicator"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_gravity="right|center_vertical"
        android:layout_marginRight="@dimen/dimen_14dp"
        android:gravity="center"
        android:orientation="horizontal" />
        
<com.hejunlin.superindicatorlibray.LoopViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_marginTop="@dimen/dimen_25dp"
        android:layout_height="@dimen/dimen_400dp"/>

java

    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(mPageAdapter);
    indicator.setViewPager(viewpager);

欢迎关注我的个人公众号, android 技术干货,问题深度总结, FrameWork 源码解析,插件化研究,最新开源项目推荐

##License

Copyright (C) 2016 hejunlin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2452 次点击
所在节点    分享创造
3 条回复
haocity
2016-08-30 10:55:00 +08:00
赞!
yuiop
2016-08-30 15:03:57 +08:00
感谢支持,将不断完善。
yuiop
2016-08-31 12:48:50 +08:00
最新引用包
Gradle :
dependencies {
compile 'com.hejunlin.superindicatorlibray:superindicatorlibray:1.0.2'
}

Maven :
<dependency>
<groupId>com.hejunlin.superindicatorlibray</groupId>
<artifactId>superindicatorlibray</artifactId>
<version>1.0.2</version>
<type>pom</type>
</dependency>

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/302398

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX