Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragments Project - Part 1 (Thiago Iori) #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thiagoiori
Copy link

Creation of TODO layout, with horizontal and vertical displays.

@thiagoiori thiagoiori changed the title Creation of TODO layout, with horizontal and vertical displays. (Thiago Iori) Fragments Project(Thiago Iori) Oct 28, 2016
@thiagoiori thiagoiori changed the title Fragments Project(Thiago Iori) Fragments Project - Part 1 (Thiago Iori) Oct 28, 2016
@cristiantanas
Copy link
Owner

¡Un buen trabajo! Pero me gustaría comentar algunos puntos:

  • Los ficheros de la carpeta .idea no hace falta incluirlos en el control de versiones ya que son ficheros específicos de cada instalación de Android Studio.
  • En la clase AddUpdateFragment tienes el siguiente constructor:
public static AddUpdateFragment newInstance(String param1, String param2) {
     AddUpdateFragment fragment = new AddUpdateFragment();
     Bundle args = new Bundle();
     fragment.setArguments(args);
     return fragment;
}

pero no lo utilizas en ningún sitio... ¿de qué ejemplo lo has copiado?

  • En el método onCreateView del fragment únicamente debería el código para "inflatar" o crear la vista. Cualquier lógica relacionada con la "navegación" o los botones debería ir en los otros métodos, como por ejemplo onActivityCreated.
  • Al hacer click en el botón gotoSubactivity siempre se inicia la NewTaskActivity, incluso cuando estamos en una tablet. Este botón no debería hacer "nada" si estamos en una tablet ya que el formulario ya está visible en la pantalla.
  • ¿Porque la NewTaskActivity implementa también la interfaz ShowTasksFragment.IListTasks? Esta Activity no debería conocer o reaccionar a las interacciones con el Fragment que muestra la lista de tareas.
  • En el fichero layout/activity_home.xml, el FrameLayout con id android:id="@+id/frameAddUpdateTask" es redundante ya que este fichero sólo se va a cargar cuando estemos en un móvil y por lo tanto, sólo se va a ver el Fragment que muestra la lista de tareas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants