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

No resource found id #0x0 #66

Open
JonathanImperato opened this issue Jan 25, 2017 · 6 comments
Open

No resource found id #0x0 #66

JonathanImperato opened this issue Jan 25, 2017 · 6 comments
Assignees
Milestone

Comments

@JonathanImperato
Copy link

01-25 13:19:17.714 E/AndroidRuntime(13823): android.content.res.Resources$NotFoundException: Resource ID #0x0 01-25 13:19:17.420 E/UncaughtException(13823): at agency.tango.materialintroscreen.MaterialIntroActivity.color(MaterialIntroActivity.java:427)
What is up? It crashes. Why?

@radzio radzio added this to the 0.0.6 milestone Jan 26, 2017
@bezmian
Copy link
Contributor

bezmian commented Jan 31, 2017

Please provide more details. If its possible please add snippet of your class which extends MaterialIntroActivity

@JonathanImperato
Copy link
Author

This is my intro activity:

`
public class IntroActivity extends MaterialIntroActivity {
@OverRide
protected void onCreate(@nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
enableLastSlideAlphaExitTransition(true);

    getBackButtonTranslationWrapper()
            .setEnterTranslation(new IViewTranslation() {
                @Override
                public void translate(View view, @FloatRange(from = 0, to = 1.0) float percentage) {
                    view.setAlpha(percentage);
                }
            });

    addSlide(new SlideFragmentBuilder()
                    .title("Organize your time with us")
                    .description("Would you try?")
                    .build(),
            new MessageButtonBehaviour(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    showMessage("We provide solutions to make you love your work");
                }
            }, "Work with love"));


    addSlide(new SlideFragmentBuilder()
            .title("That's it")
            .description("Would you join us?")
            .build());
}

@Override
public void onFinish() {
    super.onFinish();
    Toast.makeText(this, "Benvenuto!", Toast.LENGTH_SHORT).show();
    Intent myIntent = new Intent(IntroActivity.this, MainActivity.class);
    IntroActivity.this.startActivity(myIntent);
}}

@bezmian
Copy link
Contributor

bezmian commented Jan 31, 2017

Ok got it. You need to pass buttonColor and backgroundColor via SlideFragmentBuilder(). We are aware of that issue and we will fix that in future.

@mehmetgunacti
Copy link

I got this error after 800 installations on the market :

Exception android.content.res.Resources$NotFoundException: Resource ID #0x0
android.content.res.Resources.getValue (Resources.java:1351)
android.content.res.Resources.getColor (Resources.java:963)
android.content.Context.getColor (Context.java:441)
android.support.v4.content.ContextCompatApi23.getColor (ContextCompatApi23.java)
android.support.v4.content.ContextCompat.getColor (ContextCompat.java)
agency.tango.materialintroscreen.MaterialIntroActivity.onFinish (MaterialIntroActivity.java)
<OR>.color (MaterialIntroActivity.java)
<OR>.access$300 (MaterialIntroActivity.java)
agency.tango.materialintroscreen.MaterialIntroActivity.showPermissionsNotGrantedError (MaterialIntroActivity.java)

at this method in MaterialIntroActivity(426):

    private int color(@ColorRes int color) {
        return ContextCompat.getColor(this, color);
    }

Note: I don't use SlideFragmentBuilder().

@valterh4ck3r
Copy link

Override the methods : backgroundColor() , buttonsColor() and canMoveFurther().. It's necessary...

@Hatzen
Copy link

Hatzen commented Sep 1, 2019

As there is already an issue closed with the excat same error, i guess it would be better to make those needed methods abstract?

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

6 participants