Android 學(xué)習(xí)資源匯總持續(xù)更新中.....

Flutter 學(xué)習(xí)資源匯總持續(xù)更新中.....

常用的開源庫

15、ZoomImageView 支持縮放圖的ImageView類https://github.com/chrisbanes/PhotoView

23、FastBlurUtil 類:我改良過的高斯模糊(毛玻璃)工具,效率非常高,使用很靈活。

  github上的兩種實現(xiàn):
  1、https://github.com/CameraKit/blurkit-android
  2、https://github.com/wasabeef/Blurry

29、com.youth.banner.Banner 類:github 地址://https://github.com/youth5201314/banner 一個很優(yōu)秀的實現(xiàn)自動滾動banner的庫。
另外,里面有WeakHandler這個防止內(nèi)存泄露的Handler類使用。還有各種的ViewPager Transformer可以使用。 。

30、AutoSizeImageView 類:按照Bitmap的寬高比,保持ImageView寬高比。需要在設(shè)置圖片源之前調(diào)用setWidth(),setHeight()方法設(shè)置控件寬度,高度

32、EnglishCharFilter 類:限制中文字符算作兩個字,英文字符算作一個字的工具類。用法:

  editText.setFilters(new InputFilter[]{new EnglishCharFilter(MAX_COUNT)});

33、SimpleAnimatorListener 類:一個簡單的動畫監(jiān)聽類,目的是減少代碼量。只監(jiān)聽了動畫結(jié)束,因為動畫結(jié)束是最常用的

34、ZoomImageView 類:一個支持手指縮放的ImageView ,支持在ViewPager中使用

36、LongImageView 類:自定義的用于顯示長圖的控件?;赪ebView改造而來,性能卓越。

37、CenterDrawable 類:自定義的可以居中顯示一個小圖片的類。比如可以用于設(shè)置一個圖片的未顯示圖片之前的默認(rèn)圖。
用法:imageView.setImageDrawable(new CenterDrawable(R.drawable.image_loadding_icon))

38、PolygonImageView 類:github 地址:https://github.com/AlbertGrobas/PolygonImageView
一個實現(xiàn)多邊形的ImageView 類。四邊形,五邊形,六邊形。另外還有星星,撕紙形狀等,還可以自定義形狀。

39、RoundedImageView 類:一個可以實現(xiàn)圓形圖片、圓角圖片的類。github 地址:https://github.com/vinc3m1/RoundedImageView

  app:riv_corner_radius="30dp" 圓角的角度
  app:riv_border_width="2dp" 圖片邊框的寬度
  app:riv_border_color="#333333" 圖片邊框的顏色
  app:riv_mutate_background="false" 是否需要顯示控件的背景色,默認(rèn)是顯示
  app:riv_oval="true" 是否展示為圓形,如果true ,那么riv_corner_radius 不生效

40、CornerLinearLayout && CornerRelativeLayout 類:自定義的可以顯示圓角的View 。在布局中設(shè)置圓角用android:tag="20"

41、UpdateDialog 類:一套完善的檢查更新的對話框,稍作改動就可以實現(xiàn)復(fù)雜的檢查更新邏輯

42、AutoScrollRecyclerView 類:無限循環(huán)的自動滾動的RecyclerView類,可以實現(xiàn)跑馬燈效果,或者各種自動滾動效果。配合TestAutoScrollAdapter使用

43、RippleView 類:漣漪效果,類似雷達掃描

44、ViewPagerLayoutManager 類:RecyclerView的LayoutManager,仿抖音首頁效果-橫向和豎向滑動的viewPager
ViewPagerLayoutManager.OnViewPagerListener 是滑動監(jiān)聽器

43、SubsamplingScaleImageView 類:一個可以顯示長圖的控件,和36不同的是,此類是自定義View實現(xiàn)的,推薦使用這個。
github地址:https://github.com/davemorrissey/subsampling-scale-image-cheerly.mybaseproject.view

44、TestFlexBoxActivity 類:一個用谷歌FlexBox實現(xiàn)流式布局的demo類。谷歌官方出品的FlexBox,實現(xiàn)了流式布局。
其中的FlexboxLayoutManager是為RecyclerView定制,可以實現(xiàn)流式布局。
github地址:https://github.com/google/flexbox-layout

45、com.github.zyyoona7:EasyPopup:1.1.1 :一款強大,美觀,優(yōu)雅的通用彈窗XPopup,支持隨意位置顯示。
github:https://github.com/zyyoona7/EasyPopup

46、支持?jǐn)帱c續(xù)傳的下載:1、https://github.com/AriaLyy/Aria 2、https://github.com/ixuea/AndroidDownloader

47、封裝的易用數(shù)據(jù)庫dbflowhttps://github.com/agrosner/DBFlowhttps://joyrun.github.io/2016/08/02/dbflow/

48、
48.1:沉浸式狀態(tài)欄使用
https://github.com/Zackratos/UltimateBarX
48.2:設(shè)置狀態(tài)欄顏色https://github.com/msdx/status-bar-compat
48.3:判斷劉海屏的工具類:NotchUtils.class

  // 如果使用48.2,那么在Android6.0以下會存在頁面被狀態(tài)欄遮擋了的bug,需要加上這段代碼:
  // 注:viewLayout為當(dāng)前Activity的根布局
      viewLayout.post(new Runnable() {
          @Override
          public void run() {
              int[] location = new int[2];
              viewLayout.getLocationOnScreen(location);
              if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
                  int barHeight = BaseUtils.getStatusBarHeight();
                  if (location[1] < barHeight) {
                      RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) viewLayout.getLayoutParams();
                      params.topMargin = barHeight;
                      viewLayout.setLayoutParams(params);
                  }
              }
          }
      });

49、檢測是否為模擬器的工具類:EmulatorUtil.java

50、圖片裁剪器https://github.com/Yalantis/uCrop

51、一款輕量級的socket庫(模擬器Launcher在使用)https://github.com/xuuhaoo/OkSocket

52、二維碼掃描https://github.com/devilsen/CZXing(底層庫用的是:https://github.com/nu-book/zxing-cpp)

53、jackpal的Android-Terminal源碼https://github.com/jackpal/Android-Terminal-Emulator/

54、BottomDialogFragment:類似抖音評論列表--滑動關(guān)閉的dialog(使用的是BottomSheetDialogFragment或者BottomSheetDialog)

55、TestSnapNestViewPagerActivity:使用Android自帶的UI實現(xiàn)的帶頭部的嵌套滾動的ViewPager

56、CommonFragmentViewPagerAdapter:通用的ViewPager的FragmentAdapter

57、TestGridViewWithHeaderActivity:利用NestedScrollView實現(xiàn)RecyclerView帶上header

58、TestUserInfoViewModel:LiveData和ViewModel的使用示例

59、androidx.lifecycle.LifecycleObserver:可以讓隨便一個類具有Activity的生命周期

60、OnSingleClickListener:防止重復(fù)多次點擊的類

60、js和android WebView通信https://github.com/lzyzsd/JsBridge

61、集成各大push推送平臺的庫https://github.com/xuexiangjys/XPush/wiki

62、手機和電腦屏幕共享的庫,里面的TouchUtils可以實現(xiàn)轉(zhuǎn)換觸摸手勢https://github.com/android-notes/androidScreenShare

63、滑動表格庫:ScrollablePanelhttps://github.com/Kelin-Hong/ScrollablePanel

64、開源的視頻播放器https://github.com/CarGuo/GSYVideoPlayer

65、騰訊的多渠道打包https://github.com/Tencent/VasDolly

66、直接獲取TextView的LineCount的工具類,需要傳入width:TextViewLinesUtils.getTextViewLines(TextView textView, int textViewWidth);

67、ConsecutiveScrollerLayout是Android下支持多個滑動布局:(RecyclerView、WebView、ScrollView等)和普通控件(TextView、ImageView、LinearLayou、自定義View等)持續(xù)連貫滑動的容器,它使所有的子View像一個整體一樣連續(xù)順暢滑動。并且支持布局吸頂功能:https://github.com/donkingliang/ConsecutiveScroller

68、一款時間選擇器https://github.com/loperSeven/DateTimePicker

69、GroupedRecyclerViewAdapter可以很方便的實現(xiàn)RecyclerView的分組顯示,并且每個組都可以包含組頭、組尾和子項;可以方便實現(xiàn)多種Type類型的列表,可以實現(xiàn)如QQ聯(lián)系人的列表一樣的列表展開收起功能,還可以實現(xiàn)頭部懸浮吸頂功能等https://github.com/donkingliang/GroupedRecyclerViewAdapter 具體見DEMO:TestConsecutiveNestScrollActivity

70、彈性動畫實現(xiàn)

  70.1、谷歌的彈性動畫:implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0
        示例:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2017/0330/7757.html
  70.2、facebook的rebound:https://github.com/facebookarchive/rebound

view的萬能動畫:AndroidViewAnimations

71、輸入法鍵盤切換平滑過渡https://github.com/YummyLau/PanelSwitchHelper

72、FlowLayout.java:流式布局,來自騰訊團隊的QMUIFloatLayout。 https://qmuiteam.com/android/documents/

73、VerticalTextView.java:來自騰訊團隊的豎向排版的TextView

74、實現(xiàn)高斯模糊的庫https://github.com/woshidasusu/base-module/tree/master/blur

引入:implementation 'com.dasu.image:blur:0.0.6'
------------------------------------------------
用法:
//1、使用默認(rèn)配置,最短調(diào)用鏈
Bitmap bitmap = DBlur.source(MainActivity.this).radius(5).sampling(8).build().doBlurSync();

//2、同步模糊,將imageView控制的視圖進行模糊,完成后自動顯示到 imageView1 控件上,以淡入動畫方式
DBlur.source(imageView).intoTarget(imageView1).animAlpha().radius(5).sampling(8).build().doBlurSync();

//3、異步模糊,將drawable資源文件中的圖片以 NATIVE 方式進行模糊,注冊回調(diào),完成時手動顯示到 imageView1 控件上
DBlur.source(this, R.drawable.background).mode(BlurConfig.MODE_NATIVE).radius(5).sampling(8).build()
      .doBlur(new OnBlurListener() {
            @Override
            public void onBlurSuccess(Bitmap bitmap) {
                imageView1.setImageBitmap(bitmap);
            }
banner
            @Override
            public void onBlurFailed() {
                //do something
            }}); 

75、lottie動畫https://github.com/airbnb/lottie-web

優(yōu)秀開源項目

其他開源庫

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容