Android UI开发之开源控件项目整理

1、Banner

1.https://github.com/youth5201314/banner

Android广告图片轮播控件,支持无限循环和多种主题,能够灵活设置轮播样式、动画、轮播和切换时间、位置、图片加载框架等!android

使用方式为,在build.gradle里面增长以下配置:git

dependencies{
    compile 'com.youth.banner:banner:1.4.10'  //最新版本
}

效果图以下:github

 

2、Calendar

1.https://github.com/xiaojianglaile/Calendar

Android日历 仿小米 华为 滴答清单 365日历(农历),周视图 月视图 平滑滚动 节假日 五六行周切换 week or month calendar。web

使用方法:浏览器

  • MonthCalendarView的使用
<com.jeek.calendar.widget.calendar.month.MonthCalendarView
    android:id="@+id/mcvCalendar"
    android:layout_width="match_parent"
    android:layout_height="@dimen/small_month_calendar_height"
    app:month_day_text_size="@integer/small_calendar_text_size"
    app:month_selected_circle_color="@color/color_select_date_dialog_edit_text_bg_focus"
    app:month_selected_circle_today_color="@color/color_select_date_dialog_edit_text_bg_focus"
    app:month_show_lunar="true"
    app:month_show_task_hint="false"
    app:month_show_holiday_hint="true"
    app:month_text_size="@integer/small_calendar_text_size"/>
  • ScheduleLayout的使用

layout_schedule.xml文件,必须包含MonthCalendarView、WeekCalendarView和ScheduleRecyclerView,能够直接引用改文件做为布局。app

ScheduleLayout:
app:default_view="week" <!-默认周视图-> app:default_view="month" <!-默认月视图-> app:auto_change_month_row="false" <!-不自动改变五六行-> app:auto_change_month_row="true" <!-自动改变五六行->
  • 设置日期监听
slSchedule.setOnCalendarClickListener(new OnCalendarClickListener() {
    @Override
    public void onClickDate(int year, int month, int day) { //监听得到点击的年月日  } });
  • 跳转到今天
slSchedule.getMonthCalendar().setTodayToView();
  • 跳转到某一天
slSchedule.initData(year, month, day);


效果图以下:框架

 

2.https://github.com/yannecer/NCalendar

一款安卓日历,仿miui,钉钉,华为的日历,万年历、36五、周日历,月日历,月视图、周视图滑动切换,农历,节气,Andriod Calendar , MIUI Calendar,小米日历。

特色:

  • 3种常见日历交互方式,MIUI系统日历:miui九、miui十、华为emui,miui9和钉钉日历相似,华为emui和365日历相似
  • 月周滑动切换,月周不选中
  • 支持多选,设置多选的数量
  • 支持设置默认视图,默认周日历或者月日历
  • 支持周状态固定,下拉刷新等
  • 支持设置一周开始的是周一仍是周日
  • 可设置日期区间,默认区间从1901-01-01到2099-12-31
  • 支持农历,节气、法定节假日等
  • 支持添加指示点及设置指示点位置
  • 支持各类颜色、距离、位置等属性
  • 支持日历和列表之间添加view
  • 支持替换农历、颜色等
  • 支持自定义日历页面
  • 支持内部TargetView为任意View
  • 支持日历拉伸功能

效果图:

 

3、ProgressBar

1.https://github.com/zenoTsai/ArcProgressBar

项目提供了四种圆形进度条展现效果,支持自行实现绘制接口来实现想要的效果。maven

使用方式为,在build.gradle里面增长以下配置:ide

dependencies {
  compile 'com.czp.arcProgressBar:ArcProgressBar:1.0.1' }

效果图以下:布局

4、FloatingWindow

1.https://github.com/renhui/FloatingWindowDemo

经过 Service + WindowManager 来控制悬浮窗的展现,经过修改展现的内容也能够作他用:

展现效果:

 

5、WebView

1.https://github.com/tekinarslan/CrosswalkWebview

Cordova 和 CrosswalkWebview 配合一块儿使用,可以很好的支持H5的展现效果,经常使用于H5游戏开发。Crosswalk是一款开源的web引擎,在Android4.0以上的系统中使用Crosswalk可让应用程序在h5方面上得到一致性体验。 

效果图:

 

2.https://github.com/open-android/BridgeWebView

这个项目是一个JS与Java交互的Demo。

效果图以下:

使用方式以下:

1. 在project的build.gradle添加

allprojects {
    repositories {
        maven { url "https://jitpack.io" } } }

2. 在Module的build.gradle添加依赖

compile 'com.github.open-android:BridgeWebView:v1.0' 

其余的具体使用方式能够去项目的ReadMe文件中去找。

3.https://github.com/mogoweb/365browser

项目基于Chromium for Android,目标是在chromium核心的基础上提供Android WebKit API全兼容的接口,精力集中于浏览器内核精简与完善。

效果图:

6、Chart 图表

1. https://github.com/diogobernardino/WilliamChart

Williamchart是一个Android库,用于帮助在Android应用程序中实现图表。对于那些想要贡献的人,个人想法不单单是实现传统的图表功能,而是在表示和可视化数据时能够愉快和直观的东西。我宁愿保持图表简洁,而不是过分使用。

目前它提供:

  • LineChartView
  • BarChartView
  • HorizontalBarChartView
  • StackBarChartView
  • HorizontalStackBarChartView

使用方式:

compile 'com.diogobernardino:williamchart:2.5.0'

效果图:

2.https://github.com/lecho/hellocharts-android

适用于Android的图表库兼容API 8+(Android 2.2)。在硬件加速可用时效果最佳,所以建议使用API​​ 14+(Android 4.0)。

特征:

  • 折线图(立方线,实线,散点)
  • 柱形图(分组,堆叠,负值)
  • 饼形图
  • 气泡图
  • 组合图表(列/行)
  • 预览图表(用于柱形图和折线图)
  • 缩放(捏合缩放,双击缩放),滚动和闪烁
  • 自定义和自动生成的轴(顶部,底部,左侧,右侧,内侧)
  • 动画

使用方式:

Android Studio/Gradle

  • Maven Central/jCenter, add dependency to your build.gradle:
dependencies{
    compile 'com.github.lecho:hellocharts-library:1.5.8@aar' }
  • JitPack.io, add jitpack.io repositiory and dependency to your build.gradle:
repositories {
       maven {
           url "https://jitpack.io" } } dependencies { compile 'com.github.lecho:hellocharts-android:v1.5.8' }

效果图:

3.https://github.com/PhilJay/MPAndroidChart

一个强大的Android图表视图/图表视图库,支持线条 - 饼图 - 雷达 - 气泡和烛台图表以及缩放,拖动和动画。

使用方式:

Gradle

  • Project level build.gradle
allprojects {
    repositories {
        maven { url 'https://jitpack.io' } } }
  • App level build.gradle
dependencies {
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3' }

Maven

<!-- <repositories> section of pom.xml -->
<repository>
    <id>jitpack.io</id>
   <url>https://jitpack.io</url>
</repository>

<!-- <dependencies> section of pom.xml -->
<dependency>
    <groupId>com.github.PhilJay</groupId>
    <artifactId>MPAndroidChart</artifactId>
    <version>v3.0.3</version>
</dependency>

效果图:

LineChart

BarChart

水平条形图

组合图表

PieChart

ScatterChart

CandleStickChart

BubbleChart

RadarChart

 7、待续

相关文章
相关标签/搜索