哈喽,大家好,我是西哥! 又到了大家最喜欢了的环节–开源库推荐,前面为大家推荐了我的一些非常酷的开源库,受到大家一致好评,还没看过的,请移步至: 【2020年GitHub 上那些优秀Android开源库,这里是Top10!】 本期又为大家带来了哪些有趣的库呢?本期为大家精选了 Coil是Android上的一个全新的图片加载框架,它的全名叫做 它支持GIF和SVG,并且可以执行四个默认转换: 示例如下: 并且是全用Kotlin编写,如果你是纯Kotlin项目的话,那么这个库应该是你的首选。 Github地址:https://github.com/coil-kt/coil 该库具有一个非常酷的 使用非常简单,并且可以自定义,你可以在在 示例代码: 自定义样式: 然后,您应该将样式设置为 Github地址:https://github.com/iammert/MultiSearchView 它有如下特性: 该库的文档也非常全面,并包含许多示例。此外,还有一个示例应用程序展示了库的所有功能。 它是用纯Kotlin编写的,并在MIT许可下发布。如果您需要在应用程序中使用日历视图,这是一个不错的选择。 注意:该库通过Java 8+ API使用了java.time类,以便向后兼容,因为这些类是在Java 8中添加的。 因此,需要在app的 Github: https://github.com/kizitonwose/CalendarView 它有很多非常的特性: 针对不同用例的两种类型的 高度可定制化 您可以添加小红点,它具有 示例: Github文档很完善,有很多示例,更多用法和属性可去Github了解。 Github:https://github.com/gauravk95/bubble-navigation 这是一个有趣的项目,它不是一个直接可用的库,而是一个示例应用程序,展示了 详细的实现细节可以看看Medium上的系列文章: “Complex UI/Animations on Android” “Complex UI/Animations on Android — featuring MotionLayout” Github:https://github.com/nikhilpanju/FabFilter 该项目为您带来了一系列最佳实践,工具和解决方案: 看完这个项目,在模块化,Clean体系结构,测试、设置CI / CD工具,等方面,你将会受到启发。感谢作者的开源。 Github:https://github.com/igorwojda/android-showcase 它有很多强大的特性: 更多使用细节请看Github。 Github: https://github.com/lyrebirdstudio/Croppy 一个炫酷的、有趣的SeekBar动画库。 使用示例: 布局文件中配置 或者,在代码中动态配置: 更多、更详细的使用请看Github。 Github:https://github.com/Chrisvin/RubberPicker 一个炫酷的Switcher 切换动画库,真是的太可爱了,我前面也写过文章专门介绍过: 它的灵感来自于 Dribble上 Github: https://github.com/bitvale/Switcher Github文档说明了如何使用每个功能。同样值得注意的是:该库与所有最受欢迎的图像处理库(例如Picasso,Glide等)兼容。 所有可配置项如下: 更详细的使用请看Github。 Github: https://github.com/stfalcon-studio/StfalconImageViewer 该库带有很平滑的动画效果,你可以配合RecyclerView一起使用,等待加载内容时,再也不枯燥了。 示例: 更多使用请看Github。 Github: https://github.com/samlss/Broccoli 这是一个用于Kotlin和Android的Model-View-Intent (MVI)框架。它的灵感来自Jake Wharton,RxFeedback和Mosby的“Managing State with RxJava”。 根据ReadMe所说: Orbit在您的redux实现周围提供了尽可能小的结构,以使其易于使用,但您仍可以使用RxJava的强大功能。 redux系统可能如下所示: activity / fragment 中: 详细使用请看Github。 Github: https://github.com/babylonhealth/orbit-mvi 该库为 README文件包含开始项目所需的所有信息,例如如何使用 文档示例很详细,更多使用相关请看Github。 Github: https://github.com/skydoves/IndicatorScrollView 它允许那你动态更换应用主题,它内置了很多主题如: 更多详细信息请看Github。 Github: https://github.com/jaredrummler/Cyanea 这是一个示例项目,它展示了如何使用 文档几乎没有任何说明,但是如果你最近也在探索MotionLayout,这将是一个很好示例。 Github: https://github.com/faob-dev/MotionLayoutCarousel 以上就是本期的开源项目推荐,如果你也有好玩的、有趣的、强大的开源项目,也可以推荐给西哥,欢迎评论区留言讨论。 最后,求个三连!奥利给! 2020年,一招教你打造个性化的Github主页!15个有趣又有用的开源,排名不分先后,一起来看看吧!1. Coil
coroutine image loader,即协程图片加载库。与传统的图片加载库Glide,Picasso或Fresco等相比。该具有轻量(只有大约1500个方法)、快、易于使用、更现代的API等优势。模糊,圆形裁剪,灰度和圆角。imageView.load(“https://www.example.com/image.jpg") { crossfade(true) placeholder(R.drawable.image) transformations(CircleCropTransformation()) } 2. MultiSearchView
Search View动画!styles.xml下添加自定义样式。<com.iammert.library.ui.multisearchviewlib.MultiSearchView android:layout_width="match_parent" android:layout_height="wrap_content"/> multiSearchView.setSearchViewListener(object : MultiSearchView.MultiSearchViewListener{ override fun onItemSelected(index: Int, s: CharSequence) { } override fun onTextChanged(index: Int, s: CharSequence) { } override fun onSearchComplete(index: Int, s: CharSequence) { } override fun onSearchItemRemoved(index: Int) { } }) <!-- Search Text Style. --> <style name="SearchTextStyle"> <!-- Custom values write to here for SearchEditText. --> <item name="android:focusable">true</item> <item name="android:focusableInTouchMode">true</item> <item name="android:enabled">true</item> <item name="android:hint">Search</item> <item name="android:imeOptions">actionSearch</item> <item name="android:textSize">18sp</item> <item name="android:maxLength">15</item> <item name="android:inputType">textCapSentences</item> <item name="android:textColorHint">#80999999</item> <item name="android:textColor">#000</item> </style> MultiSearchView下的app:searchTextStyle。3. CalendarView
CalendarView是一个高度可定制化的日历组件库,用recycleView实现。
build.gradle 中添加如下配置:android { defaultConfig { // Required ONLY when setting minSdkVersion to 20 or lower multiDexEnabled true } compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true // Sets Java compatibility to Java 8 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:<latest-version>' } 4. Bubble Navigation
FloatingTopBarActivity
TopBarActivity
BottomBarActivity
EqualBottomBarActivity
Bubble Navigation是一个轻巧的库,可通过大量自定义选项轻松制作精美的导航栏。
NavigationViews:
BubbleNavigationConstraintView(支持spreadspread,inside, 和 packed莫斯)BubbleNavigationLinearView(允许平均分配,使用权重或packed模式)BubbleToggleView来创建新的UI组件,而不仅仅是导航<com.gauravk.bubblenavigation.BubbleNavigationConstraintView android:id="@+id/top_navigation_constraint" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="380dp" android:background="@color/white" android:elevation="4dp" android:padding="12dp" app:bnc_mode="spread"> <com.gauravk.bubblenavigation.BubbleToggleView android:id="@+id/c_item_rest" android:layout_width="wrap_content" android:layout_height="wrap_content" app:bt_active="true" app:bt_colorActive="@color/search_active" app:bt_colorInactive="@color/search_inactive" app:bt_icon="@drawable/ic_restaurant" app:bt_shape="@drawable/transition_background_drawable_restaurant" app:bt_title="@string/restaurant" app:bt_padding="@dimen/internal_padding" app:bt_titlePadding="@dimen/title_padding" /> <!-- Add more child items here - max upto 5 --> </com.gauravk.bubblenavigation.BubbleNavigationConstraintView> 5. FabFilter
使用和不使用 MotionLayout两种方式来实现的高级UI动画。6.android-showcase
android-showcase是一个非常优秀的开源项目,它是一个展示应用程序,展示了如何使用Kotlin和最新的Jetpack 技术栈来开发一个APP。
7. Croppy
Croppy是一个Android图片裁剪库。
8. RubberPicker
RubberPicker库包含RubberSeekBar和RubberRangePicker,其灵感来自Cuberto的iOS橡胶范围选择器。<com.jem.rubberpicker.RubberSeekBar ... app:minValue="20" app:maxValue="80" app:elasticBehavior="cubic" app:dampingRatio="0.3" app:stiffness="300" app:stretchRange="24dp" app:defaultThumbRadius="16dp" app:normalTrackWidth="4dp" app:highlightTrackWidth="8dp" app:normalTrackColor="#AAAAAA" app:highlightTrackColor="#BA1F33" app:defaultThumbInsideColor="#FFF" app:highlightDefaultThumbOnTouchColor="#CD5D67"/> <!-- Similar attributes can be applied for RubberRangePicker as well--> <com.jem.rubberpicker.RubberRangePicker ... app:minValue="0" app:maxValue="100" app:elasticBehavior="linear" app:dampingRatio="0.4" app:stiffness="400" app:stretchRange="36dp" app:defaultThumbRadius="16dp" app:normalTrackWidth="4dp" app:highlightTrackWidth="8dp" app:normalTrackColor="#AAAAAA" app:highlightTrackColor="#BA1F33" app:defaultThumbInsideColor="#CFCD5D67" app:highlightDefaultThumbOnTouchColor="#CD5D67"/> val rubberSeekBar = RubberSeekBar(this) rubberSeekBar.setMin(20) rubberSeekBar.setMax(80) rubberSeekBar.setElasticBehavior(ElasticBehavior.CUBIC) rubberSeekBar.setDampingRatio(0.4F) rubberSeekBar.setStiffness(1000F) rubberSeekBar.setStretchRange(50f) rubberSeekBar.setThumbRadius(32f) rubberSeekBar.setNormalTrackWidth(2f) rubberSeekBar.setHighlightTrackWidth(4f) rubberSeekBar.setNormalTrackColor(Color.GRAY) rubberSeekBar.setHighlightTrackColor(Color.BLUE) rubberSeekBar.setHighlightThumbOnTouchColor(Color.CYAN) rubberSeekBar.setDefaultThumbInsideColor(Color.WHITE) val currentValue = rubberSeekBar.getCurrentValue() rubberSeekBar.setCurrentValue(currentValue + 10) rubberSeekBar.setOnRubberSeekBarChangeListener(object : RubberSeekBar.OnRubberSeekBarChangeListener { override fun onProgressChanged(seekBar: RubberSeekBar, value: Int, fromUser: Boolean) {} override fun onStartTrackingTouch(seekBar: RubberSeekBar) {} override fun onStopTrackingTouch(seekBar: RubberSeekBar) {} }) //Similarly for RubberRangePicker val rubberRangePicker = RubberRangePicker(this) rubberRangePicker.setMin(20) ... rubberRangePicker.setHighlightThumbOnTouchColor(Color.CYAN) val startThumbValue = rubberRangePicker.getCurrentStartValue() rubberRangePicker.setCurrentStartValue(startThumbValue + 10) val endThumbValue = rubberRangePicker.getCurrentEndValue() rubberRangePicker.setCurrentEndValue(endThumbValue + 10) rubberRangePicker.setOnRubberRangePickerChangeListener(object: RubberRangePicker.OnRubberRangePickerChangeListener{ override fun onProgressChanged(rangePicker: RubberRangePicker, startValue: Int, endValue: Int, fromUser: Boolean) {} override fun onStartTrackingTouch(rangePicker: RubberRangePicker, isStartThumb: Boolean) {} override fun onStopTrackingTouch(rangePicker: RubberRangePicker, isStartThumb: Boolean) {} }) 9. Switcher
Oleg Frolov的设计。10. StfalconImageViewer
StfalconImageViewer是一个图片查看库,
该库简单且可定制。它包含一个全屏图像查看器,具有共享的图像过渡支持,捏合缩放功能以及滑动手势来关闭手势。StfalconImageViewer.Builder<String>(this, images, ::loadImage) .withStartPosition(startPosition) .withBackgroundColor(color) //.withBackgroundColorResource(R.color.color) .withOverlayView(view) .withImagesMargin(R.dimen.margin) //.withImageMarginPixels(margin) .withContainerPadding(R.dimen.padding) //.withContainerPadding(R.dimen.paddingStart, R.dimen.paddingTop, R.dimen.paddingEnd, R.dimen.paddingBottom) //.withContainerPaddingPixels(padding) //.withContainerPaddingPixels(paddingStart, paddingTop, paddingEnd, paddingBottom) .withHiddenStatusBar(shouldHideStatusBar) .allowZooming(isZoomingAllowed) .allowSwipeToDismiss(isSwipeToDismissAllowed) .withTransitionFrom(targeImageView) .withImageChangeListener(::onImageChanged) .withDismissListener(::onViewerDismissed) .withDismissListener(::onViewerDismissed) 11. Broccoli
Broccoli是一个show View Loading 库,也就是我常说的骨架屏,在内容加载的时候,显示一个占位符。Broccoli broccoli = new Broccoli(); //add the default style placeholder broccoli.addPlaceholders('activity', 'view_id', 'view_id'); or //add the default style placeholder broccoli.addPlaceholders('view1', 'view2', 'view3'); or //add the custom style placeholder broccoli.addPlaceholder(new PlaceholderParameter.Builder() .setView('view') .setAnimation('scaleAnimation'); .setDrawable(DrawableUtils.createRectangleDrawable(placeHolderColor, 0)) .build()); or //add the custom style placeholder with gradient animation broccoli.addPlaceholder(new PlaceholderParameter.Builder() .setView('view') .setDrawable(new BroccoliGradientDrawable(Color.parseColor("#DDDDDD"), Color.parseColor("#CCCCCC"), 0, 1000, new LinearInterpolator()) .build()); broccoli.show(); 12. Orbit MVI
data class State(val total: Int = 0) data class AddAction(val number: Int) sealed class SideEffect { data class Toast(val text: String) : SideEffect() } class CalculatorViewModel : OrbitViewModel<State, SideEffect> (State(), { perform("addition") .on<AddAction>() .sideEffect { post(SideEffect.Toast("Adding ${event.number}")) } .reduce { currentState.copy(currentState.total + event.number) } ... }) // Example of injection using koin, your DI system might differ private val viewModel by viewModel<CalculatorViewModel>() override fun onCreate() { ... addButton.setOnClickListener { viewModel.sendAction(AddAction) } } override fun onStart() { viewModel.connect(this, ::handleState, ::handleSideEffect) } private fun handleState(state: State) { ... } private fun handleSideEffect(sideEffect: SideEffect) { when (sideEffect) { is SideEffect.Toast -> toast(sideEffect.text) } } 13. IndicatorScrollView
IndicatorScrollView
IndicatorScrollView
NestedScrollView添加了逻辑,使它可以在滚动时,更改对指示器进行动态响应。IndicatorScrollView,IndicatorView和IndicatorItem。目前,它的版本为1.0.2,是根据Apache 2.0许可发布的。它支持API 16及更高版本。14. Cyanea
Cyanea 是一个Android 主题引擎库。
Theme.Cyanea.DarkTheme.Cyanea.Dark.LightActionBarTheme.Cyanea.Dark.NoActionBarTheme.Cyanea.LightTheme.Cyanea.Light.DarkActionBarTheme.Cyanea.Light.NoActionBar15. Android MotionLayout Carousel
MotionLayout来实现一个炫酷的轮播图。总结
近期热文
2020年GitHub 上那些优秀Android开源库,这里是Top10!
热门Android Studio 插件,这里是Top 20!
Jetpack Compose 重磅更新!增加RecyclerView、Constriantlayout、动画等重要组件!
啥?ViewBinding还能替换自定义View!
Jetpack Compose,不止是一个UI框架!
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算
官方软件产品操作指南 (170)