@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setRetainInstance(true);
  mThread.start();
}

@ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setRetainInstance ( true ) ; mThread . start ( ) ; }
fragment initialization . we way we want to be retained and start our thread .
