Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle configuration change in android annotation.(Rotation of screen)
    primarykey
    data
    text
    <p>I am using Android annotation.There is a progress dialog but when i am rotating the screen (land to port) . The progress dialog dismiss and showing these error's in log cat.</p> <blockquote> <p>Activity com.example.progressdialog.AnnotationProgressDialogActivity_ has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40661c20 that was originally added here</p> <p>android.view.WindowLeaked: Activity com.example.progressdialog.AnnotationProgressDialogActivity_ has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40661c20 that was originally added here</p> </blockquote> <p>and here is my code:-</p> <pre><code>@EActivity(R.layout.main) public class AnnotationProgressDialogActivity extends Activity { @NonConfigurationInstance ProgressDialog pd ; @NonConfigurationInstance @Bean BackgroundTask bgt; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Click public void loginButton() { pd = ProgressDialog.show(this,"Login", "Loading please wait....."); bgt.backGroundMethod(); } public void dismissDialog() { pd.dismiss(); } } enter code here @EBean public class BackgroundTask { @RootContext Activity apda; @Background public void backGroundMethod() { try { TimeUnit.SECONDS.sleep(10); update(); } catch(Exception e) { Log.e("Error",""+e); } } @UiThread public void update() { //((AnnotationProgressDialogActivity)apda).updateUI(); ((AnnotationProgressDialogActivity)apda).dismissDialog(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload