Changeset 6b383b3 in dispositivos_moviles for TibisayMovil/src/ve/gob/cenditel/tibisaymovil/TibisayMovilActivity.java
- Timestamp:
- Oct 15, 2013, 2:52:17 PM (11 years ago)
- Branches:
- master
- Children:
- 4528953
- Parents:
- 56b06e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TibisayMovil/src/ve/gob/cenditel/tibisaymovil/TibisayMovilActivity.java
r5147e01 r6b383b3 52 52 final AlertDialog sign_dialog = makeSignatureOptionsDialog(); 53 53 54 //Crear dialogo de opciones para compartir archivo 55 final AlertDialog share_dialog = makeShareOptionsDialog(); 54 56 55 57 … … 99 101 } 100 102 103 // seleccion de compartir archivo 104 if (function.equals(getString(R.string.compartir))){ 105 Toast.makeText(context, "Compartir Archivo", duration).show(); 106 share_dialog.show(); 107 108 } 109 101 110 } 102 111 }); //setOnItemClickListener … … 154 163 } 155 164 165 private void shareFile(String path){ 166 Intent intent = new Intent(this, FileToShareActivity.class); 167 168 intent.putExtra("path", path); 169 170 startActivity(intent); 171 } 172 156 173 //Crea dialogo de opciones para firma electronica 157 174 public AlertDialog makeSignatureOptionsDialog() { … … 187 204 return builder.create(); 188 205 } 206 207 //Crea dialogo de opciones para firma electronica 208 public AlertDialog makeShareOptionsDialog() { 209 final String[] option = new String[] {getString(R.string.share_pdf_signed), 210 getString(R.string.share_bdoc_downloaded), getString(R.string.share_extracted_file_from_bdoc) }; 211 ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, 212 android.R.layout.select_dialog_item, option); 213 AlertDialog.Builder builder = new AlertDialog.Builder(this); 214 215 builder.setTitle(getString(R.string.seleccione_opcion)); 216 builder.setAdapter(adapter, new DialogInterface.OnClickListener() { 217 218 public void onClick(DialogInterface dialog, int which) { 219 220 switch (which) { 221 case 0: // Archivo Firmado 222 Log.i("DEBUG", "antes de activity call"); 223 shareFile("archivoFirmado"); 224 break; 225 case 1: // Archivos BDOC Descargados 226 shareFile("bdocDescargado"); 227 break; 228 case 2: // Archivos extraídos de BDOC 229 shareFile("extraidoDeBdoc"); 230 break; 231 232 default: 233 break; 234 } 235 } 236 237 }); 238 239 return builder.create(); 240 } 241 189 242 }
Note: See TracChangeset
for help on using the changeset viewer.