My Activity is getting close on rotation. Don't know why?
Also i checked this question: Activity restart on rotation Android But can't able to find solution.
This is my oncreate function:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.manage);
//Defining and Getting Saved Preferences
data=getSharedPreferences("cybapps", 0);
dataeditor=data.edit();
//To Delete all Preferences
dataeditor.clear();
dataeditor.commit();
//Declaration
btn_delete=(Button)findViewById(R.id.btn_delete);
btn_schedule=(Button)findViewById(R.id.btn_schedule);
btn_deschedule=(Button)findViewById(R.id.btn_deschedule);
profilelist=(ListView)findViewById(R.id.profilelist);
am=(AudioManager)getSystemService(Context.AUDIO_SERVICE);
status=(TextView)findViewById(R.id.status);
random=new Random();
btn_delete.setOnClickListener(this);
btn_schedule.setOnClickListener(this);
btn_deschedule.setOnClickListener(this);
//Listout all profiles
listout();
}