• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Ramotion/cardslider-android:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Ramotion/cardslider-android

开源软件地址(OpenSource Url):

https://github.com/Ramotion/cardslider-android

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

CARDSLIDER [JAVA]

Material design UI controller that allows to swipe through cards with pictures and descriptions


We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:


Twitter Codacy Badge CircleCI Donate

Requirements

  • Android 4.4 KitKat (API lvl 19) or greater
  • Your favorite IDE

Installation

​ Just download the package from here and add it to your project classpath, or just use the maven repo:

Gradle:

'com.ramotion.cardslider:card-slider:0.3.1'

SBT:

libraryDependencies += "com.ramotion.cardslider" % "card-slider" % "0.3.1"

Maven:

<dependency>
	<groupId>com.ramotion.cardslider</groupId>
	<artifactId>card-slider</artifactId>
	<version>0.3.1</version>
</dependency>

Basic usage

CardSlider is a custom LayoutManager for RecyclerView. You can attach it to RecyclerView from code or XML layout.

Here are the attributes you can specify in the constructor or XML layout:

  • activeCardLeft - Active card offset from start of RecyclerView. Default value is 50dp.
  • cardWidth - Card width. Default value is 148dp.
  • cardsGap - Distance between cards. Default value is 12dp.

For card snapping, there is CardSnapHelper class.'

...
@Override
protected void onCreate(Bundle savedInstanceState) {
    ...
    recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new CardSliderLayoutManager(this););

    new CardSnapHelper().attachToRecyclerView(recyclerView);
    ...
}


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap