Made MainActivity.kt load projects in recyclerview and goto ProjectDetailActivity.kt on click

This commit is contained in:
Marta Borgia Leiva 2026-02-06 11:57:07 +01:00
parent 49a0e83e3e
commit 39276513a9
7 changed files with 140 additions and 17 deletions

View file

@ -37,6 +37,7 @@
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="1dp"
app:layout_constraintTop_toBottomOf="@+id/logoutButton"
android:layout_marginTop="8dp" />
android:layout_marginTop="8dp"
android:id="@+id/projectsRecyclerView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.ProjectDetailActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp">
<TextView
android:id="@+id/projectName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Project name"
android:textStyle="bold"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/projectDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Project description"
android:textSize="14sp"
android:ellipsize="end"
android:maxLines="2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/projectName"
android:layout_marginTop="4dp" />
</androidx.constraintlayout.widget.ConstraintLayout>