【我的Android進階之旅】優化自定義View時onDraw方法警告Avoid object allocations during draw/layout operations (prealloca

一、問題描述 之前的博客中我自定義了一個LinearLayout, 【我的Android進階之旅】實現一個四周圓角並且中間有小圓來進行分隔的自定義LinearLayout (https://blog.csdn.net/ouyang_peng/article/details/85295859) 今天看了下之前的這個自定義View,發現在onDraw(Canvas canvas)方法中,有大量的黃色L
相關文章
相關標籤/搜索