I know how to disable the back button, but not during a popup.
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();
}
});
I've tried everything from
@Override public void dialog.onBackPressed() { }
to
@Override dialog.onBackPressed({});
and I can't find anything that works.
Edit: Usually, it's
@Override public void onBackPressed(){}
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).