Skip to content

Commit

Permalink
update home fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
k3ssdev committed Nov 6, 2023
1 parent 73c14ff commit 312123c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public View onCreateView(@NonNull LayoutInflater inflater,
Empleado empleado = empleadoResult.get(0); // Tomamos el primer resultado como ejemplo
binding.nombreUsuario.setText(empleado.getNombre());
binding.departamentoUsuario.setText(empleado.getNombreDepartamento());
binding.emailUsuario.setText(empleado.getEmail());
// Y así sucesivamente con el resto de datos del empleado...
}
}, sharedPreferences).execute(username);
Expand Down
29 changes: 20 additions & 9 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.05" />
app:layout_constraintGuide_percent="0.03" />

<!-- Guideline inferior -->
<androidx.constraintlayout.widget.Guideline
Expand Down Expand Up @@ -46,46 +46,57 @@
app:layout_constraintGuide_percent="0.9" />

<!-- TextView para el nombre del usuario -->

<!-- TextView para el puesto del usuario -->

<TextView
android:id="@+id/nombreUsuario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nombre_del_usuario"
android:textColor="@color/blue"
android:textSize="22sp"
app:layout_constraintEnd_toEndOf="@+id/guidelineRight"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toTopOf="@+id/guidelineTop" />

<!-- TextView para el puesto del usuario -->
<!-- TextView para el departamento del usuario -->

<!-- TextView para el email del usuario -->

<TextView
android:id="@+id/departamentoUsuario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/puesto_del_usuario"
android:textColor="@color/blue_grey"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="@+id/guidelineRight"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toBottomOf="@+id/nombreUsuario" />

<!-- TextView para el departamento del usuario -->
<TextView
android:id="@+id/emailUsuario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/departamento_del_usuario"
android:text="@string/email_del_usuario"
android:textColor="@color/blue_grey"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="@+id/guidelineRight"
app:layout_constraintBottom_toTopOf="@+id/guideline2"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toBottomOf="@+id/departamentoUsuario" />
app:layout_constraintTop_toBottomOf="@+id/departamentoUsuario"
app:layout_constraintVertical_bias="0.526" />

<ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/guidelineBottom"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline2"
tools:listitem="@layout/item_employee" />

Expand All @@ -94,5 +105,5 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="127dp" />
app:layout_constraintGuide_percent="0.16" />
</androidx.constraintlayout.widget.ConstraintLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values-land/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="pref_token_summary">Añade el token de acceso</string>
<string name="pref_token_dialog_title">Access Token</string>
<string name="menu_settings">Settings</string>
<string name="email_del_usuario">email_del_usuario</string>


</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-night/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="pref_token_summary">Añade el token de acceso</string>
<string name="pref_token_dialog_title">Access Token</string>
<string name="menu_settings">Settings</string>
<string name="email_del_usuario">email_del_usuario</string>


</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-w1240dp/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="pref_token_summary">Añade el token de acceso</string>
<string name="pref_token_dialog_title">Access Token</string>
<string name="menu_settings">Settings</string>
<string name="email_del_usuario">email_del_usuario</string>


</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-w600dp/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="pref_token_summary">Añade el token de acceso</string>
<string name="pref_token_dialog_title">Access Token</string>
<string name="menu_settings">Settings</string>
<string name="email_del_usuario">email_del_usuario</string>


</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="pref_token_summary">Añade el token de acceso</string>
<string name="pref_token_dialog_title">Access Token</string>
<string name="menu_settings">Settings</string>
<string name="email_del_usuario">email_del_usuario</string>


</resources>

0 comments on commit 312123c

Please sign in to comment.