java.lang.NullPointerException with android fragment
问题 I am trying to implement Fragments in my application. The problem occurs when I change tabs (I'm using drawer layout), I get a java.lang.NullPointerException error. I tested the code on the main activity and it worked smoothly. the only problem is when I apply it on fragment. here is the code: import android.app.Fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import