Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fancy dimen resources are dot loaded correctly (resource not found) #977

Closed
krzysiekbielicki opened this issue Feb 21, 2014 · 1 comment
Closed

Comments

@krzysiekbielicki
Copy link

I have

<item name="pull_to_refresh_scroll_percentage" format="float" type="dimen">0.25</item>
<item name="pull_to_refresh_minimize_delay" format="integer" type="dimen">1000</item>

in my dimen resources.
they accesed in application by

public static float getFloat(int resourceId) {
        return Float.parseFloat(sResources.getString(resourceId));
    }

    public static int getInteger(int resourceId) {
        return sResources.getInteger(resourceId);
    }

I works on device but not when statring fragment using above code in Robolectric test.
It throws Exception:
android.content.res.Resources$NotFoundException: String resource ID #0x7f0b003a

String resource ID #0x7f0b003a is pull_to_refresh_scroll_percentage

@pawelByszewski
Copy link

PackageResourceLoader does not collect elements by default.
I have already add pull request with fix #987

@erd erd closed this as completed in db90fed Feb 28, 2014
pivotal-gospotcheck pushed a commit to pivotal-gospotcheck/robolectric that referenced this issue Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants