Sliding cards with pretty gallery effects.
Sliding cards with pretty gallery effects.
Include the following dependency in your build.gradle file.
Gradle:
repositories {
jcenter()
}
dependencies {
compile 'com.mxn.soul:slidingcard-core:1.3.1'
}For a working implementation of this project see the app/ folder.
1.Add the com.mxn.soul.slidingcard_core.ContainerView to your layout XML file.
activity_main.xml:
card_item_height need to be bigger than the height of your photo or any view you create for each item .
if you want the first view smaller than the second one to get a beautiful screen,you need to set card_item_margin
2.Create your own layout for the card
sliding_card_item.xml
3.implements ContainerView.ContainerInterface and override initCard(),exChangeCard()
…以上两个步骤缺一不可。
支持三张照片展示,手势滑动等。
需要改进的地方:
1、抗锯齿(做了基本优化,还需改进) 2、支持自定义多张照片 3、滑动动画流畅性需要优化 4、同时左滑和右滑会有bug 5、滑动过快导致最后一张加载没有显示 6、内存优化
Copyright 2015 soul.mxn
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.No open issues yet, or sync has not completed.