I have a problem with closing a custom dialog. I have two classes class 1-> AndroidHTMLActivity class 2-> CustomizeDialog
In my `AndroidHTMLActivity` I use java interface which is call from javascript, in this class i call `CustomizeDialog` public class AndroidHTMLActivity extends Activity { WebView myBrowser; setContentView(R.layout.main); myBrowser = (WebView)findViewById(R.id.mybrowser); myBrowser.addJavascriptInterface(new MyJavaScriptInterface(this), "AndroidFunction"); myBrowser.getSettings().setJavaScriptEnabled(true); myBrowser.loadUrl("file:///android_asset/mypage.html"); } public class MyJavaScriptInterface { Context mContext; MyJavaScriptInterface(Context c) { mContext = c; } public void openAndroidDialog(){ CustomizeDialog customizeDialog = new CustomizeDialog(mContext); customizeDialog.show(); } CustomizeDialog .java public class CustomizeDialog extends Dialog { Context ctx ; public CustomizeDialog(Context context) { super(context); ctx = context; } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); MyThread downloadThread = new MyThread(); downloadThread.start(); } public class MyThread extends Thread { @Override public void run() { try { handler.post(new MyRunnable()); } } } static public class MyRunnable implements Runnable { public void run() { // here i want to close this customized dialog } } Here i can't use `finish()` method, I want to close the customized dialog box via the thread. Anyone has any idea about this? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en