android的autolayout
⑴ 安卓第三方開源庫
https://github.com/Snailclimb/javaGuide
https://github.com/crossoverJie/JCSprout
https://github.com/yangchong211/YCBlogs
https://github.com/GcsSloop/AndroidNote
Android開源庫V - Layout:淘寶、天貓都在用的UI框架,趕緊用起來吧!
安卓開發者不得不收藏的工具
安卓那些你不得不收藏的開源庫
GitHub上受歡迎的Android UI Library
Android開源項目以及開源框架,各種UI實現效果
Github: https://github.com/fanhua1994/XBaseAndroid
Gituhb: https://github.com/white-cat/ThinkAndroid
Github: https://github.com/gdpancheng/LoonAndroid
http://www.52im.net/
http://blog.csdn.net/dong_18383219470/article/details/71101859
http://blog.csdn.net/dong_18383219470/article/details/77932822
https://github.com/robbiehanson/XMPPFramework Ios
http://www.igniterealtime.org/projects/smack/ Android
http://www.igniterealtime.org/projects/openfire/index.jsp Server
http://www.igniterealtime.org/projects/spark/index.jsp Client
開源中國官方安卓APP
https://gitee.com/oschina/android-app
安卓聊天APP
Gitee: https://gitee.com/735859399/weichat
Github: https://github.com/JackJiang2011/MobileIMSDK
tinker 補丁管理管理平台
https://github.com//tinker-manager
https://www.jianshu.com/p/e61a4d10e122
https://github.com/alibaba/AndFix 阿里系
ttps://github.com/dodola/HotFix 騰訊系
https://github.com/jasonross/Nuwa
https://github.com/bunnyblue/DroidFix
https://github.com/Tencent/tinker 微信
https://github.com/dodola/AnoleFix 仿美團
https://github.com/dodola/RocooFix
https://www.aliyun.com/proct/hotfix
https://github.com/Meituan-Dianping/Robust 美團系
https://github.com/meili/Aceso 蘑菇街
https://github.com/eleme/Amigo/ 餓了么
https://github.com/square/okhttp
Github: https://github.com/jeasonlzy/okhttp-OkGo 5.9K
github: https://github.com/siwangqishiq/ImageEditor-Android
github: https://github.com/Blizzard-liu/AndroidUtils
github: https://github.com/xiuweikang/IM
github: https://github.com/LaiFeng-Android/SopCastComponent
github: https://github.com/zhoubowen-sky/LingDong
github: https://github.com/cxmscb/android-MaterialEditText
GitHub: https://github.com/dmytrodanylyk/circular-progress-button
GitHub: https://github.com/johnkil/Android-AppMsg
GitHub: https://github.com/MrZhousf/EasyDB
GitHub: https://github.com/LineChen/FlickerProgressBar
GitHub:[ https://github.com/chrisbanes/Android-PullToRefresh 暫停維護]
Github: https://github.com/huxq17/XRefreshView
Github: https://github.com/scwang90/SmartRefreshLayout
Github: https://github.com/MarkMjw/PullToRefresh
Github: https://github.com/Yalantis/Phoenix
Github: https://github.com/liaohuqiu/android-cube-app
Github: https://github.com/lizhangqu/Camera
Github: https://github.com/mayubao/KuaiChuan
Github: https://github.com/greenrobot/EventBus
Github: https://github.com/stfalcon-studio/ChatKit
Github: https://github.com/Rance935/ChatUI
Github: https://github.com/qstumn/BadgeView
Github: https://github.com/bingoogolapple/BGAQRCode-Android
Github: https://github.com/dm77/barcodescanner
Github: https://github.com/googlesamples/easypermissions
Github: https://github.com/yanzhenjie/AndPermission
Github: https://github.com/nanchen2251/CompressHelper
Github: https://github.com/jeanboydev/Android-BitherCompress
Github: https://github.com/Curzibn/Luban (最接近朋友圈圖片壓縮的演算法)
Github: https://github.com/Sunzxyong/Tiny (an image compression framework.)
Github: https://github.com/FinalTeam/RxGalleryFinal
Github: https://github.com/ValuesFeng/AndroidPicturePicker
Github: https://github.com/LuckSiege/PictureSelector
Github: https://github.com/crazycodeboy/TakePhoto
Github: https://github.com/jeasonlzy/NineGridView
Github: https://github.com/donglua/PhotoPicker
Github: https://github.com/jeasonlzy/ImagePicker (已停止維護)
Github: https://github.com/LuckSiege/PictureSelector
Github: https://github.com/FinalTeam/RxGalleryFinal
Gituhb: https://github.com/DroidNinja/Android-FilePicker
Github: https://github.com/HomHomLin/AdvancedPagerSlidingTabStrip
Github: https://github.com/yangfuhai/ASimpleCache
Gituhb: https://github.com/ikew0ng/SwipeBackLayout
Github: https://github.com/liuguangqiang/SwipeBack
[圖片上傳失敗...(image-487509-1510123239039)]
[圖片上傳失敗...(image-f75761-1510123239039)]
Github: https://github.com/Tamicer/JsWebView
Github: https://github.com/forezp/SpringCloudLearning
Gituhb: https://github.com/daimajia/NumberProgressBar
Github: https://github.com/LinHuanTanLy/Pay_Master
Gituhb: https://github.com/chrisbanes/PhotoView
Github: https://github.com/orhanobut/dialogplus
Gituhb: https://github.com/saiwu-bigkoo/Android-AlertView
Github: https://github.com/afollestad/material-dialogs
Github: https://github.com/pedant/sweet-alert-dialog
Github: https://github.com/JoanZapata/android-pdfview
Gituhb: https://github.com/hongyangAndroid/Highlight
Gituhb: https://github.com/xiaoyaoyou1212/BluetoothChat
Github: https://github.com/LillteZheng/ViewPagerHelper
Github: https://github.com/crazyandcoder/citypicker
Github: https://github.com/QMUI/QMUI_Android
MVP+RxJava2+Retrofit2+Glide+Rxbus,主要實現日報、新聞、干貨、影視等資訊,個人項目
Github: https://github.com/Horrarndoo/YiZhi
Github: https://github.com/yangchong211/LifeHelper
A memory leak detection library for Android and Java.(用於Android和Java的內存泄漏檢測庫)
Github: https://github.com/square/leakcanary
Github: https://github.com/zerochl/FFMPEG-AAC-264-Android-32-64
Github: https://github.com/aesion/NodeProgressView
https://github.com/CarGuo/GSYVideoPlayer
Github: https://github.com/gjiazhe/WaveSideBar
Github: https://github.com/fanhua1994/WheelPicker
Gituhb: https://github.com/XXApple/AndroidLibs
Github: https://github.com/AigeStudio/WheelPicker
Github: https://github.com/scwang90/SmartRefreshLayout (最強)
Github : https://github.com/RawnHwang/SmartRefreshLayout
Github: https://github.com/anzewei/NestRefreshLayout
Github: https://github.com/lipangit/JiaoZiVideoPlayer
Github: https://github.com/ACRA/acra
Github: https://github.com/CarGuo/CustomActionWebView
Github: https://github.com/fanhua1994/FastVideoPlayer
輕松將相機功能集成到您的Android應用程序
Github: https://github.com/google/cameraview
Github: https://github.com/hongyangAndroid/AndroidAutoLayout
Github: https://github.com/JessYanCoding/AndroidAutoSize (今日頭條)
視頻錄制 視頻壓縮
Github: https://github.com/zerochl/FFMPEG-AAC-264-Android-32-64
Github: https://github.com/WritingMinds/ffmpeg-android-java
Github : https://github.com/chenhui28/VideoRecorderAndCompressor
Weixin: https://mp.weixin.qq.com/s/7ffZB0_RB90i5c60bEYRWg
Github: https://github.com/bm-x/PhotoView
Github: https://github.com/chrisbanes/PhotoView
Github: https://github.com/jpush/aurora-imui
Github: https://github.com/MZCretin/WifiTransfer-master
Github: https://github.com/DuanJiaNing/Musicoco
Github: https://github.com/GitLqr/LQRWeChat
Github: https://github.com/hmkcode/Android
Github: https://github.com/TheFinestArtist/FinestWebView-Android
github: https://github.com/delight-im/Android-AdvancedWebView
一款新聞客戶端, MVP + RxJava + Retrofit + Dagger2
Github: https://github.com/Will-Ls/WeiYue
Github: https://github.com/yaowen369/DownloadHelper
Github: https://github.com/SOFTPOWER1991/OpenCVCheck
Github: https://github.com/luozhanming/Captcha
Github: https://github.com/JesseFarebro/Android-Mqtt
Github: https://github.com/wenmingvs/AndroidProcess
Github: https://github.com/jaredrummler/AndroidProcesses
Github: https://github.com/daimajia/AndroidSwipeLayout
Github: https://github.com/norbsoft/android-typeface-helper
Github: https://github.com/zcweng/ToggleButton
Github: https://github.com/wangzailfm/WanAndroidClient (Kotlin)
Github: https://github.com/salecoding/WanAndroid (Java)
Github: https://github.com/zrunker/IbookerEditorAndroid/
Github: https://github.com/jfeinstein10/SlidingMenu
Github: https://github.com/SpecialCyCi/AndroidResideMenu
Github: https://github.com/totond/TextPathView
Github: https://github.com/DroidPluginTeam/DroidPlugin [360手機助手]
Github:[
⑵ Android 屏幕適配
1: dp: android 尺寸的基本單位。 在不同的解析度的手機裡面,1dp對應著不同數量的px, 這樣就實現了dp定義一個控制項大小的時候,在不同解析度手機里表現出相應大小的像素值。
2: 屏幕解析度: 1080下160, 表示寬度有1080個像素點而高度有2160個像素點。常見的解析度有320x480, 480x800, 720x1280, 1080x1920等。
3: 屏幕尺寸: 以寸為單位, Android設備對角線的長度
4: 像素密度: 每英寸的像素點
5: 屏幕尺寸, 解析度,像素密度 三者之間的關系:
密度(dpi)= √(寬2 + 高2)/屏幕尺寸
6: px:像素,是屏幕上顯示數據的最基本的點
7: dpi:屏幕像素密度,每英寸上的像素點數
8: sp:與dp類似,通常用於指定字體的大小,當用戶修改手機顯示的字體時,字體大小會隨之改變。
1: dp適配方案: Android自帶的原始的適配方案, 在不同的解析度手機裡面表現出相應大小的像素點。
缺點: Android的碎片化嚴重, 如果生產廠家沒有根據屏幕尺寸、解析度和像素密度的關系來規則定義, 或者出一些亂七八糟的屏幕大小,這樣的適配方案就不在適合了。
2: 寬高限定符:枚舉所有的屏幕寬高像素值,根據等比縮放去適配。如果沒有找到對應的屏幕, 則取默認的。 目前這種方案已經被棄用。
缺點:
1: 佔用資源大,會增加APK的體積。
2: 容錯機制大需要精準命中資源文件才能適配,比如1920x1080的手機就一定要找到1920x1080的限定符,否則就只能用統一的默認的dimens文件了。而使用默認的尺寸的話,UI就很可能變形。
3:AndroidAutoLayout適配方案(停止維護)
4: SW限定符適配方案:(smallestWidth最小寬度適配)
Android 會去識別屏幕可用高度或者寬度的最小尺寸的dp值。然後根據識別到的結果去對應的資源文件裡面去找尋相應的結果。
如何生成:ScreenMatch插件
此方案跟寬高限定的適配方案相比,有很好的容錯機制, 如果沒有找到對應的適配寬度, 那麼會在vlues文件裡面去找跟他最接近的寬度。
5:今日頭條適配方案:
1>: px 轉 dp 的公式 dp = px / density.不管我們設定的單位是什麼, 最終我們都會將這些單位長度轉化為px的。density就是他們的轉化比, 所以,動態改變這個轉化比也是可以達到我們適配屏幕的目的的。
2>: 通過修改density值,強行把所有不同尺寸解析度的手機的寬度dp值改成一個統一的值(在清單文件中定義),這樣就解決了所有的適配問題。
3>: Density = 當前設備屏幕總寬度(單位為像素)/ 設計圖總寬度(單位為 dp) ;
4>:引入了AndroidAutoSize屏幕適配框架:
https://github.com/JessYanCoding/AndroidAutoSize
最後, 最重要的................
點贊 點贊 點贊, 不重要的事情也就說3遍......