Created
April 14, 2015 19:57
-
-
Save emoralest/e773335f8bf657d72f65 to your computer and use it in GitHub Desktop.
Android - Ocultar Divider de un Dialog
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
final Dialog dialog = new Dialog(getActivity()); | |
dialog.setContentView(R.layout.dialog_regemail); | |
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent); | |
//HACK PARA ELIMINAR DIVIDER DE UN DIALOG | |
int dividerId = dialog.getContext().getResources().getIdentifier("android:id/titleDivider", null, null); | |
View divider = dialog.findViewById(dividerId); | |
divider.setBackgroundColor(getResources().getColor(android.R.color.transparent)); | |
//CONTROLES DENTRO DEL DIALOG | |
Button btnRegistrar = (Button) dialog.findViewById(R.id.btnRegistrar); | |
//LISTENER DE BOTÓN DEL DIALOG | |
btnRegistrar.setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
dialog.dismiss(); | |
} | |
}); | |
dialog.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment