Style类
/**
* Validates the style state, throw an IllegalArgumentException on invalid state.
*
* @param methodCall the calling method name
*/
private void validateState(String methodCall) {
if (!fullyLoaded) {
throw new IllegalStateException(
String.format("Calling %s when a newer style is loading/has loaded.", methodCall)
);
}
}
机型分布:
荣耀、三星、google
版本分布:
android 8,9,10
解决办法:
使用Style前进行判断,Style.isFullyLoaded() ;
/**
* Returns true if the style is fully loaded. Returns false if style hasn't been fully loaded or a new style is
* underway of being loaded.
*
* @return True if fully loaded, false otherwise
*/
public boolean isFullyLoaded() {
return fullyLoaded;
}