2
如何從我的/可繪製資源中製作的NinePatch圖像製作NinePatchDrawable對象?Android:從資源創建NinePatchDrawable
如何從我的/可繪製資源中製作的NinePatch圖像製作NinePatchDrawable對象?Android:從資源創建NinePatchDrawable
調用getResources().getDrawable()
,提供可繪製資源的ID。引用的文檔爲getDrawable()
:
各種類型的對象將根據底層的資源被返回 - 例如,單色,PNG圖像,可擴展的圖像,等等。可繪製對象API隱藏了這些實現的細節。