This file contains hidden or 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
private ArrayList<String> splitToArrayList(String string) { | |
ArrayList<String> result = new ArrayList<String>(); | |
if(string == null || string.trim().length() == 0) | |
return result; | |
//Pipes, in this case. | |
String[] split = string.split("[|]"); | |
return new ArrayList<String>(Arrays.asList(split)); | |
} |
This file contains hidden or 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 |
This file contains hidden or 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
/* | |
* LocationService | |
* La mejor forma de obtener Lat y Long dependiendo el proveedor. | |
* Usando un BroadcastReceiver para la obtención de location | |
* | |
* import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; |