2016-11-25 45 views

回答

2

使用的東西作爲

ResourcesCompat.getColor(getResources(), R.color.red, null) 

(以API級別23的主題之前,將不會應用,因此它可能是null。)

+0

我會建議使用'context.getTheme()'而不是'null'或者你可能只是使用不推薦的方法。 –

相關問題