Below is my code.
I want to set it disable auto change screen orientation.
And enable auto change screen orientation.
class NewLoad extends AsyncTask<String, String, String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
progDailog = new ProgressDialog(this);
progDailog.setMessage("test");
progDailog.setIndeterminate(false);
progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progDailog.setCancelable(false);
progDailog.show();
//set disable auto change
}
@Override
protected String doInBackground(String... aurl) {
//do something
return null;
}
@Override
protected void onPostExecute(String unused) {
super.onPostExecute(unused);
progDailog.dismiss();
//set enable auto change
}
}
How can I do it?
Make your activity to look something like this in manifest
ScreenSize attribute seems to be added in 4.0 so don’t mentioned it if you are ruuning below 4.0.