松露洗牌Android数据驱动的百分比布局UI卡片库

基于百分比的卡片布局,配合数据驱动和动画,松露洗牌这个 Android UI 库用起来还挺顺手的。卡片大小能跟着屏幕自动调,适配性不错,做推荐页、数据展示合适。

数据驱动 UI的方式挺省事,数据变了,UI 跟着走,基本不用你手动去管状态更新。配合RecyclerView和 Kotlin 写起来也比较顺,响应也快。

卡片组件支持的内容比较丰富,不只是文字图像,尺寸还能跟数据变化动态调整。要做那种“热度排行”或“对比”一类的页面,蛮好用的。

动画效果也没拉胯,有旋转、缩放、滑动那类动效,还能根据数据驱动触发,做起来就比较“活”了,用户体验也会直观多。

百分比布局这点我还挺喜欢的,像width: 60%这种写法,省得你去算 dp,尤其屏幕尺寸不同的时候,UI 展示更有保障。

你用 Kotlin 写 Android 的话,用起来会更顺手一点。Gradle 引一下库,配置下就能跑,API 也蛮友好。

如果你正好在做内容卡片、推荐列表或者那种图文混排的展示页,可以试试“松露洗牌”。搭建起来快,效果也还挺炫。

zip
truffle-shuffle-master.zip 预估大小:76个文件
folder
truffle-shuffle-master 文件夹
file
.travis.yml 415B
file
gradlew.bat 2KB
file
gradlew 5KB
file
gradle.properties 751B
folder
.github 文件夹
file
Truffle Shuffle-logo.png 14KB
file
PULL_REQUEST_TEMPLATE.md 528B
file
textcontentvideo3cards.gif 637KB
file
textcontentvideo.gif 1.94MB
file
truffleshuffle_logo.svg 278KB
file
CONTRIBUTING.md 1KB
file
textcontentvideolandscape.gif 15.4MB
file
TurboTaxCards.gif 1.67MB
file
CODE_OF_CONDUCT.md 1KB
file
textcontentvideowithmargins.gif 1002KB
file
truffleshuffle_logo_with_name.svg 273KB
file
textcardswithtitle.gif 6.24MB
file
CODEOWNERS 83B
folder
truffleshuffle 文件夹
file
proguard-rules.pro 751B
folder
src 文件夹
folder
test 文件夹
folder
java 文件夹
folder
com 文件夹
folder
intuit 文件夹
folder
truffleshuffle 文件夹
file
CardViewGroupTest.kt 4KB
file
AnimationDebouncerTest.kt 1KB
file
CardDataObjects.kt 471B
file
CardContentAdapterTest.kt 2KB
folder
main 文件夹
folder
res 文件夹
folder
values 文件夹
file
strings.xml 78B
file
attrs.xml 380B
file
dimens.xml 271B
folder
kotlin 文件夹
folder
com 文件夹
folder
intuit 文件夹
folder
truffleshuffle 文件夹
file
CardViewGroup.kt 13KB
file
CardMeasurements.kt 3KB
file
CardContentAdapter.kt 3KB
file
AnimationDebouncer.kt 1KB
file
AndroidManifest.xml 49B
file
.gitignore 7B
file
build.gradle 4KB
file
LICENSE 11KB
folder
app 文件夹
file
proguard-rules.pro 935B
folder
src 文件夹
folder
main 文件夹
folder
res 文件夹
folder
values-land 文件夹
file
card_view_group_percentages.xml 138B
folder
mipmap-xxxhdpi 文件夹
file
ic_launcher.png 10KB
file
ic_launcher_round.png 14KB
folder
values-sw600dp-land 文件夹
file
card_view_group_percentages.xml 392B
folder
mipmap-hdpi 文件夹
file
ic_launcher.png 3KB
file
ic_launcher_round.png 4KB
folder
values 文件夹
file
colors.xml 362B
file
strings.xml 86B
file
styles.xml 430B
file
card_view_group_percentages.xml 390B
folder
mipmap-xxhdpi 文件夹
file
ic_launcher.png 8KB
file
ic_launcher_round.png 10KB
folder
mipmap-mdpi 文件夹
file
ic_launcher.png 2KB
file
ic_launcher_round.png 2KB
folder
mipmap-xhdpi 文件夹
file
ic_launcher.png 5KB
file
ic_launcher_round.png 6KB
folder
values-sw600dp 文件夹
file
card_view_group_percentages.xml 392B
folder
layout 文件夹
file
activity_main.xml 812B
file
card_layout.xml 669B
folder
kotlin 文件夹
folder
com 文件夹
folder
intuit 文件夹
folder
truffle 文件夹
folder
shuffle 文件夹
folder
cardGallery 文件夹
file
CardContent.kt 336B
file
CustomizeAdapter.kt 916B
file
MainActivity.kt 2KB
file
AndroidManifest.xml 843B
file
.gitignore 7B
file
build.gradle 800B
folder
gradle 文件夹
folder
wrapper 文件夹
file
gradle-wrapper.jar 52KB
file
gradle-wrapper.properties 232B
folder
.idea 文件夹
folder
codeStyles 文件夹
file
Project.xml 4KB
file
runConfigurations.xml 564B
file
misc.xml 515B
file
jarRepositories.xml 2KB
file
sonarIssues.xml 304B
file
os-project-logo.svg 8KB
file
ktlint.gradle 541B
file
.all-contributorsrc 2KB
file
.gitignore 1KB
folder
CHANGELOG.md 文件夹
file
README.es.md 6KB
file
README.md 9KB
file
.editorconfig 380B
file
settings.gradle 34B
file
build.gradle 608B
...
zip 文件大小:27.11MB