title: How do I disable the Android back button during a popup?
body: <p>I know how to disable the back button, but not during a popup.</p>
  
  <pre><code>syncb=(Button) findViewById(R.id.SyncB);
  syncb.setOnClickListener(new View.OnClickListener() 
      {
          public void onClick(View v) 
          {
              final Dialog dialog = new Dialog(Scouting.this);
              dialog.setContentView(R.layout.popup);
              dialog.setTitle("Popups ftw");
              dialog.setCancelable(true);
              //I think I'd put the code here...
              Button button = (Button) dialog.findViewById(R.id.closePopup);
              button.setOnClickListener(new View.OnClickListener() {
                  public void onClick(View v) {
                      dialog.dismiss();
                  }    
              });
              dialog.show();
          }
      });
  </code></pre>
  
  <p>I've tried everything from</p>
  
  <pre><code>@Override public void dialog.onBackPressed() { }
  </code></pre>
  
  <p>to</p>
  
  <pre><code>@Override dialog.onBackPressed({});
  </code></pre>
  
  <p>and I can't find anything that works.</p>
  
  <p>Edit:
  Usually, it's</p>
  
  <pre><code>@Override public void onBackPressed(){}
  </code></pre>
  
  <p>and it's usually in the main class(not 'nested') but since I'm dug in a little...I'm not figuring it out(trying to, but not succeeding).</p>