原创 CoordinatorLayout系列(四)CollapsingToolbarLayout

系列文章: CoordinatorLayout系列(一):Behavior CoordinatorLayout系列(二)AppBarLayout CoordinatorLayout系列(三)AppBarLayout之layout_

原创 CoordinatorLayout系列(三)AppBarLayout之layout_scrollFlags

系列文章: CoordinatorLayout系列(一):Behavior CoordinatorLayout系列(二)AppBarLayout CoordinatorLayout系列(三)AppBarLayout之layout_

原创 python編譯出錯:Could not build the ssl module! Python requires an OpenSSL 1.0.1

原文鏈接:https://blog.csdn.net/devalone/article/details/82459276 在編譯python3.7的時候有一個錯誤,這個錯誤是ssl模塊不能編譯,版本不對,雖然說python仍然能使

原创 安卓如何申請sd卡權限並寫入文件

最近項目有需求,需要向sd卡寫入文件,在網上找了一大堆文章,很多文章都是吧Internal Storage當成了sd卡,到最後解決辦法都變成了如何動態申請權限了。 在此記錄一下我的解決辦法,在安卓4.4之後,使用android.p

原创 安卓 ViewTreeObserver源碼分析

今天在寫程序時報了一個這樣的錯: This ViewTreeObserver is not alive, call getViewTreeObserver() again 原因是我在Activity的onCreate方法中這樣寫

原创 CoordinatorLayout系列(五)例子

系列文章: CoordinatorLayout系列(一):Behavior CoordinatorLayout系列(二)AppBarLayout CoordinatorLayout系列(三)AppBarLayout之layout_

原创 適配Anddroid Q黑暗模式

其實適配黑夜模式非常簡單,兩步就能搞定,只需要增加黑夜模式的配置文件即可,剩下具體如何適配的,系統已經幫我們做好了。 適配的步驟: 1、使得App的主題繼承自Theme.AppCompat.DayNight,當然不止這一種主題,帶

原创 安卓 ImagView的ScaleType

今天做一個應用加載圖片,發現圖片的位置沒有佔滿整個ImageView,發現是ImageView的ScaleType屬性沒有設置,一般將ScaleType屬性設置成centerCrop,關於ImageView的屬性可以查看這篇文章:

原创 安卓動畫(三)Recyclerview ItemAnimator(上)

安卓動畫(三)Recyclerview ItemAnimator(下) 前面講了補間動畫、Transition動畫,屬性動畫,這一篇講一講和Recyclerview相關的動畫。 Recyclerview裏面有一個類ItemAnim

原创 CoordinatorLayout系列(一):Behavior

系列文章: CoordinatorLayout系列(一):Behavior CoordinatorLayout系列(二)AppBarLayout CoordinatorLayout系列(三)AppBarLayout之layout_

原创 Recyclerview緩存機制分析

最近做項目的時候突然想到一個問題,就是在項目裏面使用了多種ViewHolder,但是在onBindView這個方法中,RecyclerView是如何知道我在哪個位置需要的是哪種ViewHolder呢?就這個問題趁機看了一下源碼,終

原创 pip安裝requests到指定目錄

pip install --target=安裝目錄 安裝模塊名 sudo pip3 install --target=/usr/local/lib/python3.7/site-packages/ requests

原创 CoordinatorLayout系列(二)AppBarLayout

系列文章: CoordinatorLayout系列(一):Behavior CoordinatorLayout系列(二)AppBarLayout CoordinatorLayout系列(三)AppBarLayout之layout_

原创 如何優雅的申請sd卡權限

在上一篇文章安卓如何申請sd卡權限並寫入文件已經解決了向sd卡里面寫入文件的問題了,解決辦法需要startActivity,然後在onActivityResult方法裏面去監聽是否授權成功,這種方法對當前Activity的侵入性太

原创 Mat數據結構

最近開始opencv的學習,首先就要從opencv的矩陣開始學起了。opencv的矩陣是用Mat這個對象來存儲的,並且提供了一些訪問矩陣屬性的函數,比如獲取行數、列數、獲取步長等等。 矩陣的內存分佈 Mat的在內存中是線性存儲的,