0
getColor(int)
は推奨されていません。getColor(int)getColor(int、theme theme)を使用する方法はありません
どうすればgetColor(int, theme theme)
を使用できますか?
私はいくつかのレッスンを使用しましたが、私はどのように使用することができませんgetColor(int, theme theme)
。
getColor(int)
は推奨されていません。getColor(int)getColor(int、theme theme)を使用する方法はありません
どうすればgetColor(int, theme theme)
を使用できますか?
私はいくつかのレッスンを使用しましたが、私はどのように使用することができませんgetColor(int, theme theme)
。
使用
ResourcesCompat.getColor(getResources(), R.color.red, null)
として何か(それはnull
かもしれので、以前のAPIレベル23にテーマが適用されません。)
私は 'context.getTheme()'を使うのではなく、 'null'を使うか、あるいは廃止予定のメソッドを使うこともできます。 –
あなたがリソースを見たことがありますか? https://developer.android.com/reference/android/content/res/Resources.html#getColor(int、android.content.res.Resources.Theme) –