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、待續

相關文章
相關標籤/搜索