@Override public void onClickConcluirReporte( String new_status, String coment, Bitmap img, String costales) { // TODO Auto-generated method stub Orden or = datos.adapter.getOrden(orden_position); String image_name = datos.getOrdenName(or, Datos.TIPO_IMAGEN_FIN, "jpg"); String image_url = datos.createOrdenName(or, Datos.TIPO_IMAGEN_FIN, "jpg"); String ordenId = or.getIdSolicitud(); files.saveImage(image_name, files.BACHES_PHOTOS_DIRECTORY, img); or.setEstatus("Orden Finalizada"); or.setEstatusId(new_status); addJsonReporte(ordenId, new_status, coment, costales); addJsonImage( image_name, files.BACHES_PHOTOS_DIRECTORY + image_name, image_url, ordenId, new_status); String ordenJson = CreateOrdenJson.createFromAdapter(datos.adapter); files.saveFile("ordenes.txt", ordenJson, files.BACHES_CACHE_DIRECTORY); createAlert("Reporte", "Se ha finalizado el reporte!!"); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_concluir_reporte); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); if (savedInstanceState == null) { // getFragmentManager().beginTransaction() // .add(R.id.container, new PlaceholderFragment()).commit(); } orden_position = getIntent().getExtras().getInt("orden_position"); datos = Datos.getInstance(); files = new Files(); ((ConcluirReporteFragment) getSupportFragmentManager().findFragmentById(R.id.concluir_reporte_fragment)) .setListener(this); }