aboutsummaryrefslogtreecommitdiff
path: root/Client
diff options
context:
space:
mode:
Diffstat (limited to 'Client')
-rw-r--r--Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml1
-rw-r--r--Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivitySinglePost.kt77
-rw-r--r--Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityUserProfile.kt1
-rw-r--r--Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostComments.kt31
-rw-r--r--Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostDescription.kt127
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml6
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_comments.xml5
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_description.xml25
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/post_image.xml14
9 files changed, 153 insertions, 134 deletions
diff --git a/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml
index a059c5b..49e17d8 100644
--- a/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml
+++ b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml
@@ -91,6 +91,7 @@
android:screenOrientation="portrait" />
<activity
android:name=".Activities.ActivitySinglePost"
+ android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
android:screenOrientation="portrait" />
<activity
android:name=".Activities.ActivityAddPost"
diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivitySinglePost.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivitySinglePost.kt
index df5de58..34a9e6b 100644
--- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivitySinglePost.kt
+++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivitySinglePost.kt
@@ -25,6 +25,8 @@ import com.example.brzodolokacije.Models.PostImage
import com.example.brzodolokacije.Models.PostPreview
import com.example.brzodolokacije.Models.UserReceive
import com.example.brzodolokacije.R
+import com.example.brzodolokacije.Services.RetrofitHelper
+import com.example.brzodolokacije.Services.SharedPreferencesHelper
import com.example.brzodolokacije.databinding.ActivitySinglePostBinding
import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_single_post_description.*
@@ -33,6 +35,8 @@ import org.osmdroid.tileprovider.tilesource.TileSourceFactory
import org.osmdroid.util.GeoPoint
import org.osmdroid.views.MapView
import org.osmdroid.views.overlay.Marker
+import retrofit2.Call
+import retrofit2.Response
class ActivitySinglePost : AppCompatActivity() {
@@ -62,11 +66,10 @@ class ActivitySinglePost : AppCompatActivity() {
setContentView(binding.root)
//get post --------------------------------
post= intent.extras?.getParcelable("selectedPost")!!
-
-
+ addView()
+ getMap()
btnChangeHeightUp=findViewById(R.id.activitySinglePostChangeHeightUp)
btnChangeHeightDown=findViewById(R.id.activitySinglePostChangeHeightDown)
-
btnChangeHeightDown.isVisible=false
btnChangeHeightDown.isGone=true
btnChangeHeightDown.isClickable=false
@@ -81,41 +84,43 @@ class ActivitySinglePost : AppCompatActivity() {
}
+
//instantiate adapter and linearLayout
adapterImages= PostImageAdapter(this@ActivitySinglePost, post.images as MutableList<PostImage>)
layoutManagerImages= LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)
recyclerViewImages = binding.rvMain
+ //DODATI SLIKE
+ recyclerViewImages?.setHasFixedSize(true)
+ recyclerViewImages?.layoutManager = layoutManagerImages
+ recyclerViewImages?.adapter = adapterImages
loadTextComponents()
- /*
- buildRecyclerViewComments()
- requestGetComments()
+ var fm: FragmentTransaction =supportFragmentManager.beginTransaction()
+ val fragment = FragmentSinglePostDescription()
+ val b = Bundle()
+ b.putString("post", Gson().toJson(post))
+ fragment.arguments = b
+ fm.replace(R.id.flSinglePostFragmentContainer, fragment)
+ fm.commit()
+
+ /*
favouriteImage=binding.ivFavourite
// set recyclerView attributes
- recyclerViewImages?.setHasFixedSize(true)
- recyclerViewImages?.layoutManager = layoutManagerImages
- recyclerViewImages?.adapter = adapterImages
-
- setRatingListeners()
- translateOwnerIdToName(post.ownerId)
loadFavourite()
- val alreadyrated= RatingReceive(starNumber.toInt(),post._id)
- requestAddRating(alreadyrated)
+
*/
+ translateOwnerIdToName(post.ownerId)
+
binding.tvUser.setOnClickListener {
val intent: Intent = Intent(this@ActivitySinglePost,ActivityUserProfile::class.java)
- var args= Bundle()
- args.putString("post", Gson().toJson(post))
+ var b= Bundle()
+ intent.putExtra("user", Gson().toJson(userData))
this.startActivity(intent)
}
- binding.tvLocationType.setOnClickListener{
- getMap()
-
- }
-
+ //DATA CONTAINER PROMENA VISINE
btnChangeHeightUp.setOnClickListener {
btnChangeHeightUp.isVisible=false
btnChangeHeightUp.isGone=true
@@ -126,6 +131,10 @@ class ActivitySinglePost : AppCompatActivity() {
linearLayout2.setMinHeight(0);
linearLayout2.setMinimumHeight(0);
linearLayout2.getLayoutParams().height= ViewGroup.LayoutParams.MATCH_PARENT;
+ recyclerViewImages?.setHasFixedSize(true)
+ recyclerViewImages?.layoutManager = layoutManagerImages
+ recyclerViewImages?.adapter = adapterImages
+
}
btnChangeHeightDown.setOnClickListener {
btnChangeHeightDown.isVisible=false
@@ -137,6 +146,10 @@ class ActivitySinglePost : AppCompatActivity() {
linearLayout2.setMinHeight(0);
linearLayout2.setMinimumHeight(0);
linearLayout2.getLayoutParams().height= ViewGroup.LayoutParams.WRAP_CONTENT;
+ recyclerViewImages?.setHasFixedSize(true)
+ recyclerViewImages?.layoutManager = layoutManagerImages
+ recyclerViewImages?.adapter = adapterImages
+
}
/*favouriteImage!!.setOnClickListener{
@@ -202,11 +215,6 @@ class ActivitySinglePost : AppCompatActivity() {
*/
fun getMap(){
- /*val mapDialogue = BottomSheetDialog(this@ActivitySinglePost, android.R.style.Theme_Black_NoTitleBar)
- mapDialogue.getWindow()?.setBackgroundDrawable(ColorDrawable(Color.argb(100, 0, 0, 0)))
- mapDialogue.setContentView(R.layout.map_dialogue)
- mapDialogue.setCancelable(true)
- mapDialogue.setCanceledOnTouchOutside(true)*/
var map: MapView? = null
Configuration.getInstance().load(this, PreferenceManager.getDefaultSharedPreferences(this));
map=findViewById(R.id.MapDialogueMapView)
@@ -233,22 +241,22 @@ class ActivitySinglePost : AppCompatActivity() {
binding.apply {
tvTitle.text= post.location.name
tvTitle.invalidate()
- tvLocationType.text="Otvorite Mapu"
- tvLocationType.setTextColor(Color.BLUE)
+ tvLocationType.text=post.location.country.toString()
tvLocationType.invalidate()
- tvLocationParent.text="TODO"
+ tvLocationParent.text=post.location.city.toString()
tvLocationParent.invalidate()
tvRating.text=post.ratings.toString()
tvRating.invalidate()
tvNumberOfRatings.text=post.ratingscount.toString()
tvNumberOfRatings.invalidate()
- tvDescription.text=post.description
- tvDescription.invalidate()
+ //tvRating.text=String.format("%.2f",data.ratings)
+ //tvNumberOfRatings.text=String.format("%d",data.ratingscount)
+
}
}
- /*
+
fun addView() {
var token= SharedPreferencesHelper.getValue("jwt", this).toString()
val Api= RetrofitHelper.getInstance()
@@ -271,12 +279,12 @@ class ActivitySinglePost : AppCompatActivity() {
val request= api.getProfileFromId("Bearer " + token, id)
request.enqueue(object : retrofit2.Callback<UserReceive> {
override fun onResponse(call: Call<UserReceive>,
- response: Response<UserReceive>) {
+ response: Response<UserReceive>
+ ) {
if (response.body() == null) {
return
}
userData = response.body()!!
-
binding.tvUser.text= userData!!.username.toString()
}
@@ -286,5 +294,4 @@ class ActivitySinglePost : AppCompatActivity() {
})
}
-*/
}
diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityUserProfile.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityUserProfile.kt
index 85e342c..4962006 100644
--- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityUserProfile.kt
+++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityUserProfile.kt
@@ -57,6 +57,7 @@ class ActivityUserProfile : AppCompatActivity() {
showFollowing=findViewById(id.tvActivityUserProfileFollow)
showFollowers=findViewById(R.id.tvActivityUserProfileFollowers)
+
val jsonMyObject: String
val extras = intent.extras
if (extras != null) {
diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostComments.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostComments.kt
index 43c1967..45fbcba 100644
--- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostComments.kt
+++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostComments.kt
@@ -11,6 +11,7 @@ import android.view.inputmethod.InputMethodManager
import android.widget.EditText
import android.widget.ImageView
import android.widget.TextView
+import android.widget.Toast
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.brzodolokacije.Adapters.CommentsAdapter
@@ -56,6 +57,20 @@ class FragmentSinglePostComments : Fragment() {
newComment=view.findViewById(R.id.NewComment)
postComment=view.findViewById(R.id.btnPostComment)
+ buildRecyclerViewComments()
+ requestGetComments()
+
+ postComment.setOnClickListener {
+ if(newComment.text.isNotEmpty()){
+ val comment=CommentReceive(newComment.text.toString(),"")
+ requestAddComment(comment)
+
+
+ }
+ else{
+ Toast.makeText(requireActivity(),"Unesite tekst komentara.",Toast.LENGTH_LONG).show()
+ }
+ }
return view
}
@@ -68,10 +83,10 @@ class FragmentSinglePostComments : Fragment() {
override fun onResponse(call: Call<CommentSend?>, response: Response<CommentSend?>) {
if(response.isSuccessful){
- var newComment=response.body()!!
- requestGetComments(newComment)
- //newComment.text.clear()
- //hideKeyboard(newComment)
+ var newComment1=response.body()!!
+ requestGetComments(newComment1)
+ newComment.text.clear()
+ hideKeyboard(newComment)
}else{
if(response.errorBody()!=null)
@@ -130,10 +145,10 @@ class FragmentSinglePostComments : Fragment() {
recyclerViewComments!!.layoutManager=layoutManagerComments
recyclerViewComments!!.adapter= adapterComments
}
- /*fun hideKeyboard(item: EditText){
- var imm: InputMethodManager =this.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
+ fun hideKeyboard(item: EditText){
+ var imm: InputMethodManager =activity?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(item.windowToken, InputMethodManager.HIDE_NOT_ALWAYS)
- }*/
+ }
fun countComments(comments:List<CommentSend>):Int{
var count:Int=0
@@ -145,7 +160,7 @@ class FragmentSinglePostComments : Fragment() {
return count
}
- public fun addedComment(){
+ fun addedComment(){
commentsCount.text=(Integer.parseInt(commentsCount.text.toString())+1).toString()
commentsCount.invalidate()
}
diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostDescription.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostDescription.kt
index 63e7b6a..877fbc4 100644
--- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostDescription.kt
+++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentSinglePostDescription.kt
@@ -5,6 +5,7 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.ImageButton
import android.widget.ImageView
import android.widget.TextView
import android.widget.Toast
@@ -37,6 +38,8 @@ class FragmentSinglePostDescription : Fragment() {
var view=inflater.inflate(R.layout.fragment_single_post_description, container, false)
+
+
//uzmi post prosledjen iz single post
var args = arguments
var jsonPostObject = args!!.getString("post")
@@ -53,66 +56,70 @@ class FragmentSinglePostDescription : Fragment() {
star4=view.findViewById(R.id.rateStar4)
star5=view.findViewById(R.id.rateStar5)
- fun setRatingListeners() {
- val emptyStar = R.drawable.ic_round_star_outline_24
- val fullStar = R.drawable.ic_baseline_star_rate_24
-
- star1.setOnClickListener {
- //Toast.makeText(this,"kliknuta prva zvezdica",Toast.LENGTH_SHORT).show()
- star1.setImageResource(fullStar)
- star2.setImageResource(emptyStar)
- star3.setImageResource(emptyStar)
- star4.setImageResource(emptyStar)
- star5.setImageResource(emptyStar)
- starNumber=1
- rate(starNumber)
- }
- star1.setOnClickListener {
- //Toast.makeText(this,"kliknuta druga zvezdica",Toast.LENGTH_SHORT).show()
- star1.setImageResource(fullStar)
- star2.setImageResource(fullStar)
- star3.setImageResource(emptyStar)
- star4.setImageResource(emptyStar)
- star5.setImageResource(emptyStar)
- starNumber=2
- rate(starNumber)
- }
- star1.setOnClickListener {
- //Toast.makeText(this,"kliknuta treca zvezdica",Toast.LENGTH_SHORT).show()
- star1.setImageResource(fullStar)
- star2.setImageResource(fullStar)
- star3.setImageResource(fullStar)
- star4.setImageResource(emptyStar)
- star5.setImageResource(emptyStar)
- starNumber=3
- rate(starNumber)
- }
- star1.setOnClickListener {
- Toast.makeText(requireActivity(),"kliknuta cetvrta zvezdica",Toast.LENGTH_SHORT).show()
- star1.setImageResource(fullStar)
- star2.setImageResource(fullStar)
- star3.setImageResource(fullStar)
- star4.setImageResource(fullStar)
- star5.setImageResource(emptyStar)
- starNumber=4
- rate(starNumber)
- }
- star1.setOnClickListener {
- //Toast.makeText(this,"kliknuta peta zvezdica",Toast.LENGTH_SHORT).show()
- star1.setImageResource(fullStar)
- star2.setImageResource(fullStar)
- star3.setImageResource(fullStar)
- star4.setImageResource(fullStar)
- star5.setImageResource(fullStar)
- starNumber=5
- rate(starNumber)
- }
+ setRatingListeners()
+ val alreadyrated= RatingReceive(starNumber.toInt(),post._id)
+ requestAddRating(alreadyrated)
- }
-
return view
}
+ fun setRatingListeners() {
+ val emptyStar = R.drawable.ic_round_star_outline_24
+ val fullStar = R.drawable.ic_baseline_star_rate_24
+
+ star1.setOnClickListener {
+ //Toast.makeText(this,"kliknuta prva zvezdica",Toast.LENGTH_SHORT).show()
+ star1.setImageResource(fullStar)
+ star2.setImageResource(emptyStar)
+ star3.setImageResource(emptyStar)
+ star4.setImageResource(emptyStar)
+ star5.setImageResource(emptyStar)
+ starNumber=1
+ rate(starNumber)
+ }
+ star1.setOnClickListener {
+ //Toast.makeText(this,"kliknuta druga zvezdica",Toast.LENGTH_SHORT).show()
+ star1.setImageResource(fullStar)
+ star2.setImageResource(fullStar)
+ star3.setImageResource(emptyStar)
+ star4.setImageResource(emptyStar)
+ star5.setImageResource(emptyStar)
+ starNumber=2
+ rate(starNumber)
+ }
+ star1.setOnClickListener {
+ //Toast.makeText(this,"kliknuta treca zvezdica",Toast.LENGTH_SHORT).show()
+ star1.setImageResource(fullStar)
+ star2.setImageResource(fullStar)
+ star3.setImageResource(fullStar)
+ star4.setImageResource(emptyStar)
+ star5.setImageResource(emptyStar)
+ starNumber=3
+ rate(starNumber)
+ }
+ star1.setOnClickListener {
+ Toast.makeText(requireActivity(),"kliknuta cetvrta zvezdica",Toast.LENGTH_SHORT).show()
+ star1.setImageResource(fullStar)
+ star2.setImageResource(fullStar)
+ star3.setImageResource(fullStar)
+ star4.setImageResource(fullStar)
+ star5.setImageResource(emptyStar)
+ starNumber=4
+ rate(starNumber)
+ }
+ star1.setOnClickListener {
+ //Toast.makeText(this,"kliknuta peta zvezdica",Toast.LENGTH_SHORT).show()
+ star1.setImageResource(fullStar)
+ star2.setImageResource(fullStar)
+ star3.setImageResource(fullStar)
+ star4.setImageResource(fullStar)
+ star5.setImageResource(fullStar)
+ starNumber=5
+ rate(starNumber)
+ }
+
+
+ }
fun rate(starNumber:Number){
if(starNumber.toInt()>0){
@@ -125,12 +132,10 @@ class FragmentSinglePostDescription : Fragment() {
val postApi = RetrofitHelper.getInstance()
val token = SharedPreferencesHelper.getValue("jwt", requireActivity())
val request = postApi.addRating("Bearer " + token, post._id, rating)
- request.enqueue(object : retrofit2.Callback<RatingData?> {
- override fun onResponse(call: Call<RatingData?>, response: Response<RatingData?>) {
+ request.enqueue(object : retrofit2.Callback<RatingData> {
+ override fun onResponse(call: Call<RatingData>, response: Response<RatingData>) {
if (response.isSuccessful) {
var data = response.body()!!
- //binding.tvRating.text=String.format("%.2f",data.ratings)
- //binding.tvNumberOfRatings.text=String.format("%d",data.ratingscount)
Log.d(
"--------------",
data.ratings.toString() + " " + data.ratingscount.toString()
@@ -161,7 +166,7 @@ class FragmentSinglePostDescription : Fragment() {
}
- override fun onFailure(call: Call<RatingData?>, t: Throwable) {
+ override fun onFailure(call: Call<RatingData>, t: Throwable) {
Log.d("main2", t.message.toString())
}
})
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml
index 108e1cf..cf5327a 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml
@@ -24,12 +24,12 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="308dp"
android:background="@drawable/view_top_corner_radius"
android:elevation="30dp"
- android:paddingBottom="0dp"
- android:paddingTop="16dp"
android:paddingHorizontal="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_comments.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_comments.xml
index bd4d760..250f640 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_comments.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_comments.xml
@@ -45,8 +45,9 @@
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
+ app:layout_constraintTop_toBottomOf="@+id/postCommentLayout">
</androidx.recyclerview.widget.RecyclerView>
@@ -55,7 +56,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- app:layout_constraintBottom_toBottomOf="parent">
+ app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<EditText
android:id="@+id/NewComment"
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_description.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_description.xml
index e2973ca..5bbdb14 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_description.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_single_post_description.xml
@@ -11,24 +11,8 @@
android:layout_height="wrap_content"
android:background="@drawable/rounded_picture_background"
android:padding="@dimen/component_padding"
- app:layout_constraintTop_toBottomOf="@+id/linearLayout"
tools:layout_editor_absoluteX="0dp">
- <TextView
- android:id="@+id/tvDescriptionLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
- android:layout_marginEnd="362dp"
- android:gravity="top|start"
- android:padding="@dimen/text_padding"
- android:text="Opis"
- android:textSize="@dimen/header1_size"
- android:textStyle="bold"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvDescription"
@@ -36,9 +20,9 @@
android:layout_height="wrap_content"
android:text="TextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextView"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.526"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/tvDescriptionLabel" />
-
+ app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title"
@@ -63,6 +47,7 @@
app:layout_constraintTop_toBottomOf="@+id/title">
<ImageView
+ android:clickable="true"
android:id="@+id/rateStar1"
android:layout_width="50dp"
android:layout_height="50dp"
@@ -70,6 +55,7 @@
android:src="@drawable/ic_round_star_outline_24" />
<ImageView
+ android:clickable="true"
android:id="@+id/rateStar2"
android:layout_width="50dp"
android:layout_height="50dp"
@@ -77,6 +63,7 @@
android:src="@drawable/ic_round_star_outline_24" />
<ImageView
+ android:clickable="true"
android:id="@+id/rateStar3"
android:layout_width="50dp"
android:layout_height="50dp"
@@ -84,6 +71,7 @@
android:src="@drawable/ic_round_star_outline_24" />
<ImageView
+ android:clickable="true"
android:id="@+id/rateStar4"
android:layout_width="50dp"
android:layout_height="50dp"
@@ -91,6 +79,7 @@
android:src="@drawable/ic_round_star_outline_24" />
<ImageView
+ android:clickable="true"
android:id="@+id/rateStar5"
android:layout_width="50dp"
android:layout_height="50dp"
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/post_image.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/post_image.xml
index c2a999d..fb8a035 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/post_image.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/post_image.xml
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="380dp"
- android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_margin="10dp"
- android:background="@drawable/rounded_picture_background"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+
+ android:clickable="true"
android:clipToOutline="true"
- android:clickable="true">
+ android:padding="5dp">
<ImageView
android:id="@+id/locationImage"
android:layout_width="match_parent"
- android:layout_height="420dp"
+ android:layout_height="512dp"
android:outlineProvider="background"
android:scaleType="centerCrop"
android:src="@drawable/b1"
@@ -23,5 +24,4 @@
app:layout_constraintVertical_bias="0.0" />
-
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file