material-intro-screen
material-intro-screen copied to clipboard
No resource found id #0x0
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?
Please provide more details. If its possible please add snippet of your class which extends MaterialIntroActivity
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);
}}
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.
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().
Override the methods : backgroundColor() , buttonsColor() and canMoveFurther().. It's necessary...
As there is already an issue closed with the excat same error, i guess it would be better to make those needed methods abstract?