aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-12-10 16:12:35 +0100
committerJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-12-10 16:12:35 +0100
commit0a231c323994fa9ce456e9627f9ead1f1ee65c97 (patch)
tree933214f4c83efe4a0688a477e1872b6630c42723
parent7a179bcc045e18ee09e70cf6b5ff589bebe8fd77 (diff)
Na klik pratioca ili pracenja se odlazi na njihov profil #83
-rw-r--r--Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Adapters/FollowersAdapter.kt10
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/follower_item.xml6
2 files changed, 13 insertions, 3 deletions
diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Adapters/FollowersAdapter.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Adapters/FollowersAdapter.kt
index eaca6ea..ff798cc 100644
--- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Adapters/FollowersAdapter.kt
+++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Adapters/FollowersAdapter.kt
@@ -1,6 +1,8 @@
package com.example.brzodolokacije.Adapters
import android.app.Activity
+import android.content.Intent
+import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -8,9 +10,11 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
+import com.example.brzodolokacije.Activities.ActivityUserProfile
import com.example.brzodolokacije.Models.UserReceive
import com.example.brzodolokacije.R
import com.example.brzodolokacije.Services.RetrofitHelper
+import com.google.gson.Gson
class FollowersAdapter (var followers:MutableList<UserReceive>, val activity: Activity):
RecyclerView.Adapter<FollowersAdapter.FollowerViewHolder>() {
@@ -42,6 +46,12 @@ class FollowersAdapter (var followers:MutableList<UserReceive>, val activity: Ac
.circleCrop()
.into(pfp)
}
+ itemView.setOnClickListener {
+ val intent: Intent = Intent(activity, ActivityUserProfile::class.java)
+ var b= Bundle()
+ intent.putExtra("user", Gson().toJson(follower))
+ activity.startActivity(intent)
+ }
}
}
} \ No newline at end of file
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/follower_item.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/follower_item.xml
index 9285741..b295b43 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/follower_item.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/follower_item.xml
@@ -20,8 +20,8 @@
<androidx.cardview.widget.CardView
android:id="@+id/cvFragmentHomePageProfile"
- android:layout_width="80dp"
- android:layout_height="80dp"
+ android:layout_width="70dp"
+ android:layout_height="70dp"
android:layout_gravity="center"
android:elevation="10dp"
@@ -47,7 +47,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginStart="24dp"
- android:layout_marginTop="28dp"
+ android:layout_marginTop="20dp"
android:text="Petar Petrovic"
android:textSize="17sp"
android:textStyle="bold"