Null object reference if configuration changes
I get null object reference if configuration changes for only LinearLayout objects. landscape mode I have to setVisiblity = View.GONE for all views except one view portrait mode I have to setVisibility = View.VISIBLE for all views: if (Activity started in portrait mode then turned into landscape) {it work fine} else {it get null object reference only for linearLayout objects} objects return this error are called chart , progress_layout . edited most of class "related code snippet" cause full class 1000 line cannot post it public class Cardio extends ActionBarActivity implements InsertDialogue