Last active
December 15, 2015 06:59
-
-
Save korniltsev/5220729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User: korniltsev | |
* Date: 22.03.13 | |
* Time: 14:51 | |
*/ | |
public class ConfirmDialogFactory { | |
public static Dialog build(Activity a) | |
{ | |
final Dialog dialog = new Dialog(a,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)a.getParent(); | |
parent.switchTab(TabBarActivity.CONFIRM_ACTIVITY_TAB);// 1 - плохо, вынеси куданибудь в константу | |
dialog.dismiss(); | |
} | |
}); | |
return dialog; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment