Skip to content

Instantly share code, notes, and snippets.

@korniltsev
Created March 22, 2013 11:53
Show Gist options
  • Save korniltsev/5220724 to your computer and use it in GitHub Desktop.
Save korniltsev/5220724 to your computer and use it in GitHub Desktop.
/**
* User: korniltsev
* Date: 22.03.13
* Time: 14:51
*/
public class ConfirmDialogFactory {
public static void build(Context c)
{
       final Dialog dialog = new Dialog(c,R.style.CustomStyle);
       dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
       dialog.setContentView(R.layout.confirmtransferdialog);
       // set the custom dialog components - text, image and button
       ImageButton dialogButtonOK = (ImageButton) dialog.findViewById(R.id.ConfirmTransferButtonOK);
       dialogButtonOK.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View v) {
               TabBarActivity parent = (TabBarActivity)getParent();
               parent.switchTab(1);
               dialog.dismiss();
           }
       });
       dialog.show();
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment