Proyectos de Subversion Android Microlearning - Nuevo Interface

Rev

Rev 38 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 38 Rev 39
Línea 332... Línea 332...
332
 
332
 
Línea 333... Línea 333...
333
        Log.e("Cargo datos"," en tarjeta principal");
333
        Log.e("Cargo datos"," en tarjeta principal");
334
 
334
 
335
        //Capsula de primera tarjeta
-
 
-
 
335
        //Capsula de primera tarjeta
336
        CapsuleDao capsuleDao = iTwoGetSkills.getDatabase().getCapsuleDao();
336
        CapsuleDao capsuleDao = iTwoGetSkills.getDatabase().getCapsuleDao();
337
 
337
        boolean continues=false;
Línea 338... Línea 338...
338
        Progress progress;
338
        Progress progress;
Línea 345... Línea 345...
345
            progress = progressDao.selectByCapsuleUuid(dbCapsule.getUuid());
345
            progress = progressDao.selectByCapsuleUuid(dbCapsule.getUuid());
Línea 346... Línea 346...
346
 
346
 
Línea 347... Línea 347...
347
            if (progress != null) {
347
            if (progress != null) {
348
 
348
 
349
                    if (progress.getProgress() < 100) {
-
 
-
 
349
                    if (progress.getProgress() < 100) {
350
                    //    Log.e("Es menor"," a 100");
350
                        Log.e("Es menor"," a 100");
351
 
351
                        continues=true;
352
                        titulotarjeta.setText(dbCapsule.getName());
352
                        titulotarjeta.setText(dbCapsule.getName());
353
                        progresotarjeta.setVisibility(View.VISIBLE);
353
                        progresotarjeta.setVisibility(View.VISIBLE);
354
                        progresoporcentaje.setVisibility(View.VISIBLE);
354
                        progresoporcentaje.setVisibility(View.VISIBLE);
355
                        progresotarjeta.setProgress((int) progress.getProgress());
355
                        progresotarjeta.setProgress((int) progress.getProgress());
Línea -... Línea 356...
-
 
356
                        progresoporcentaje.setText("" + progress.getProgress() + " %");
-
 
357
                        empezar.setText("En curso");
356
                        progresoporcentaje.setText("" + progress.getProgress() + " %");
358
 
Línea 357... Línea 359...
357
                        empezar.setText("En curso");
359
                        iTwoGetSkills.getPreference().setOrigennavigation("welcome");
358
 
360
 
359
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
361
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
360
 
362
 
361
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
363
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
362
                        ) {
364
                        ) {
Línea 363... Línea 365...
363
                            return;
365
                            return;
364
                        }
-
 
Línea 365... Línea 366...
365
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
366
                        }
Línea 366... Línea 367...
366
                     //   Log.e("La capsula","activa en loadcurso"+dbCapsule.getUuid());
367
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
367
 
368
                     //   Log.e("La capsula","activa en loadcurso"+dbCapsule.getUuid());
Línea 435... Línea 436...
435
                        progresotarjeta.setVisibility(View.INVISIBLE);
436
                        progresotarjeta.setVisibility(View.INVISIBLE);
436
                        progresoporcentaje.setVisibility(View.INVISIBLE);
437
                        progresoporcentaje.setVisibility(View.INVISIBLE);
437
                        empezar.setText("Nueva");
438
                        empezar.setText("Nueva");
438
                        continuar.setText("Ver cápsula");
439
                        continuar.setText("Ver cápsula");
Línea -... Línea 440...
-
 
440
 
-
 
441
                        iTwoGetSkills.getPreference().setOrigennavigation("welcome");
439
 
442
 
Línea 440... Línea 443...
440
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
443
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
441
 
444
 
442
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
445
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
443
                        ) {
446
                        ) {
444
                            return;
447
                            return;
445
                        }
448
                        }
446
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
449
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
447
                      //  Log.e("La capsula","activa en load"+dbCapsule.getUuid());
-
 
Línea 448... Línea 450...
448
                        iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
450
                      //  Log.e("La capsula","activa en load"+dbCapsule.getUuid());
Línea 449... Línea 451...
449
                        iTwoGetSkills.getPreference().setOrigennavigation("welcome");
451
                        iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
450
 
452
 
Línea 487... Línea 489...
487
            }
489
            }
Línea 488... Línea 490...
488
 
490
 
489
 
491
 
490
 
492
 
491
        }
493
        }
492
        else if (!titulotarjeta.getText().equals(""))
494
        else if (!titulotarjeta.getText().equals("") && !continues)
Línea 518... Línea 520...
518
                        progresotarjeta.setVisibility(View.INVISIBLE);
520
                        progresotarjeta.setVisibility(View.INVISIBLE);
519
                        progresoporcentaje.setVisibility(View.INVISIBLE);
521
                        progresoporcentaje.setVisibility(View.INVISIBLE);
520
                        empezar.setText("Nueva");
522
                        empezar.setText("Nueva");
521
                        continuar.setText("Ver cápsula");
523
                        continuar.setText("Ver cápsula");
Línea -... Línea 524...
-
 
524
 
-
 
525
                        iTwoGetSkills.getPreference().setOrigennavigation("welcome");
-
 
526
 
522
 
527
 
Línea 523... Línea 528...
523
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
528
                        int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
524
 
529
 
525
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
530
                        if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
526
                        ) {
531
                        ) {
527
                            return;
532
                            return;
528
                        }
533
                        }
529
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
534
                        iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
530
                       // Log.e("La capsula","activa en load"+dbCapsule.getUuid());
-
 
Línea 531... Línea 535...
531
                        iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
535
                       // Log.e("La capsula","activa en load"+dbCapsule.getUuid());
Línea 532... Línea 536...
532
                        iTwoGetSkills.getPreference().setOrigennavigation("welcome");
536
                        iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
533
 
537