沉浸式狀態欄_boolean hasTopLine = a.getBoolean(1, false);//AS會在"1"下顯示錯誤紅線

TypedArray a = mContext.obtainStyledAttributes(attrs);
boolean hasBottomLine = a.getBoolean(0, false); boolean hasTopLine = a.getBoolean(1, false);//AS會在"1"下顯示錯誤紅線.

解決方案:

在該方法上添加@SuppressWarnings("ResourceType"),這樣便可過濾該警告,能夠正常經過簽名編譯。typescript

相關文章
相關標籤/搜索