Closed Tizhoodh82 closed 5 years ago
this is my force close ` E/AndroidRuntime: FATAL EXCEPTION: main Process: com.barnamehnevis.viewpager_tutorial, PID: 16408 android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.Resources.getValue(Resources.java:1542) at android.content.res.Resources.getColor(Resources.java:1184) at android.support.v4.content.ContextCompat.getColor(ContextCompat.java:413) at agency.tango.materialintroscreen.MaterialIntroActivity.color(MaterialIntroActivity.java:427) at agency.tango.materialintroscreen.MaterialIntroActivity.getBackgroundColor(MaterialIntroActivity.java:419) at agency.tango.materialintroscreen.MaterialIntroActivity.access$1200(MaterialIntroActivity.java:44) at agency.tango.materialintroscreen.MaterialIntroActivity$ColorTransitionScrollListener.setViewsColor(MaterialIntroActivity.java:444) at agency.tango.materialintroscreen.MaterialIntroActivity$ColorTransitionScrollListener.pageScrolled(MaterialIntroActivity.java:434) at agency.tango.materialintroscreen.listeners.ViewBehavioursOnPageChangeListener.onPageScrolled(ViewBehavioursOnPageChangeListener.java:54) at android.support.v4.view.CustomViewPager.dispatchOnPageScrolled(CustomViewPager.java:1922) at android.support.v4.view.CustomViewPager.onPageScrolled(CustomViewPager.java:1896) at agency.tango.materialintroscreen.widgets.SwipeableViewPager.onPageScrolled(SwipeableViewPager.java:88) at android.support.v4.view.CustomViewPager.pageScrolled(CustomViewPager.java:1834) at android.support.v4.view.CustomViewPager.scrollToItem(CustomViewPager.java:695) at android.support.v4.view.CustomViewPager.onLayout(CustomViewPager.java:1778) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1142) at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:836) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:850) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16075) at android.view.ViewGroup.layout(ViewGroup.java:5300) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2119) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1873) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1073) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5988) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.v I/Process: Sending signal. PID: 16408 SIG: 9 Application terminated.
`
I use this code for my IntroActivity and my application is force close. IntroActivity.java : `package com.barnamehnevis.viewpager_tutorial;
import android.content.Context; import android.os.Bundle; import android.support.annotation.FloatRange; import android.support.annotation.Nullable; import android.view.View; import agency.tango.materialintroscreen.MaterialIntroActivity; import agency.tango.materialintroscreen.SlideFragmentBuilder; import agency.tango.materialintroscreen.animations.IViewTranslation; import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
public class IntroActivity extends MaterialIntroActivity {
}
CustomSlide:
package com.barnamehnevis.viewpager_tutorial;import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import agency.tango.materialintroscreen.SlideFragment;
public class CustomSlide extends SlideFragment {
// @Override // public int backgroundColor() { // return R.drawable.gradiant; // }
// @Override // public boolean canMoveFurther() { // return checkBox.isChecked(); // }
}
CustomSlideTwo:
package com.barnamehnevis.viewpager_tutorial;import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import agency.tango.materialintroscreen.SlideFragment;
public class CustomSlideTwo extends SlideFragment {
// @Override // public int backgroundColor() { // return R.drawable.gradiant; // }
// @Override // public boolean canMoveFurther() { // return checkBox.isChecked(); // }
}`