Search in sources :

Example 1 with StyleData

use of org.robolectric.res.StyleData in project robolectric by robolectric.

the class ShadowAssetManager method resolveStyle.

private Style resolveStyle(@NotNull ResName themeStyleName, Style themeStyleSet) {
    TypedResource themeStyleResource = resourceTable.getValue(themeStyleName, RuntimeEnvironment.getQualifiers());
    if (themeStyleResource == null)
        return null;
    StyleData themeStyleData = (StyleData) themeStyleResource.getData();
    if (themeStyleSet == null) {
        themeStyleSet = new ThemeStyleSet();
    }
    return new StyleResolver(resourceTable, shadowOf(AssetManager.getSystem()).getResourceTable(), themeStyleData, themeStyleSet, themeStyleName, RuntimeEnvironment.getQualifiers());
}
Also used : ThemeStyleSet(org.robolectric.res.ThemeStyleSet) FileTypedResource(org.robolectric.res.FileTypedResource) TypedResource(org.robolectric.res.TypedResource) StyleResolver(org.robolectric.res.StyleResolver) StyleData(org.robolectric.res.StyleData)

Aggregations

FileTypedResource (org.robolectric.res.FileTypedResource)1 StyleData (org.robolectric.res.StyleData)1 StyleResolver (org.robolectric.res.StyleResolver)1 ThemeStyleSet (org.robolectric.res.ThemeStyleSet)1 TypedResource (org.robolectric.res.TypedResource)1