title: What is difference between custom dialog and activity as dialog means "Theme.Dialog"?
body: <p>Here my question is What is real difference between Custom dialog and activity which I made its theme as dialog and is opening as dialog,
  I have used both of these, some of small difference which I understand is follows</p>
  
  <ol>
  <li>coding remains in other file in activity and in same file in custom dialog(if we haven't created new class file for dialog),</li>
  <li>Activity stays in activity stack, while dialog not.</li>
  </ol>
  
  <p>Is there any other difference? So Y we need custom dialog in place of activity as dialog and visa versa,</p>
  
  <p>My current problem is when I click on listitem and it opens new activity (as dialog here), and when i press back button and click again on item it "stops unexpectedly", and couldn't understand error, my error is as below</p>
  
  <pre>
  04-18 12:21:18.945: E/AndroidRuntime(915): FATAL EXCEPTION: main
  04-18 12:21:18.945: E/AndroidRuntime(915): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131230777, class android.widget.ListView) with Adapter(class com.logicbridge.lazyloader.MyOrdersLazyAdapter)]
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.widget.ListView.layoutChildren(ListView.java:1538)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.widget.AbsListView$CheckForTap.run(AbsListView.java:2728)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.os.Handler.handleCallback(Handler.java:605)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.os.Handler.dispatchMessage(Handler.java:92)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.os.Looper.loop(Looper.java:137)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at android.app.ActivityThread.main(ActivityThread.java:4424)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at java.lang.reflect.Method.invokeNative(Native Method)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at java.lang.reflect.Method.invoke(Method.java:511)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  04-18 12:21:18.945: E/AndroidRuntime(915):  at dalvik.system.NativeStart.main(Native Method)
  </pre>
  
  <p>My code is for listview </p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.my_order_list);
          initControls();
          loadList();
      }
  
      private void initControls() {
          progress = new ProgressDialog(this);
          progress.setMessage("Loading...");
          list = (ListView) findViewById(R.id.my_order_List);
  
      }
  
      private void loadList() {
          StaticItems.myorderadapter = new MyOrdersLazyAdapter(MyOrders.this,
                  StaticItems.myOrderListArr);
          list.setAdapter(StaticItems.myorderadapter);
          list.setOnItemLongClickListener(new OnItemLongClickListener() {
  
              @Override
              public boolean onItemLongClick(AdapterView&lt;?&gt; arg0, View arg1,
                      int arg2, long arg3) {
                  // TODO Auto-generated method stub
                  // Starts new activity after some process
                  ArrayList&lt;String&gt; str = new ArrayList&lt;String&gt;();
                  str.add("loadOrdersDetail");
                  str.add("2");
                  new MyTask(str).execute();
                  return false;
              }
          });
      }
  </code></pre>
  
  <p>Does this happens because of I have used new activity instead of dialog?? </p>