aboutsummaryrefslogtreecommitdiff
path: root/Client/BrzoDoLokacije/app/src/main/res/layout
diff options
context:
space:
mode:
authorTAMARA JERINIC <tamara.jerinic@gmail.com>2022-11-22 14:32:55 +0100
committerTAMARA JERINIC <tamara.jerinic@gmail.com>2022-11-22 14:32:55 +0100
commitf78e1b517442e51e091ae409b83f000ed37f275f (patch)
tree490d1662106e3aa356f19f70cfd8fd7617e7abd3 /Client/BrzoDoLokacije/app/src/main/res/layout
parent7da3e307a5186a13cfcbec3bfa77eb9d1af93850 (diff)
Dodati podaci o korisniku u objavi. Omogućen prikaz profila korisnika iz objave.
Diffstat (limited to 'Client/BrzoDoLokacije/app/src/main/res/layout')
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_single_post.xml70
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml252
2 files changed, 294 insertions, 28 deletions
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 a8a03aa..e3cabb5 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
@@ -41,8 +41,8 @@
android:gravity="top|start"
android:padding="@dimen/text_padding"
android:text="Drzava, grad"
- app:layout_constraintTop_toBottomOf="@+id/tvLocationType"
- tools:layout_editor_absoluteX="0dp" />
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvLocationType" />
<TextView
android:id="@+id/tvTitle"
@@ -52,7 +52,8 @@
android:padding="@dimen/text_padding"
android:text="Naslov"
android:textSize="@dimen/header1_size"
- android:textStyle="bold" />
+ android:textStyle="bold"
+ app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvLocationType"
@@ -61,15 +62,27 @@
android:gravity="top|start"
android:padding="@dimen/text_padding"
android:text="Tip lokacije"
- app:layout_constraintTop_toBottomOf="@+id/tvTitle"
- tools:layout_editor_absoluteX="0dp" />
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvTitle" />
+
+ <TextView
+ android:id="@+id/tvUser"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:gravity="top|start"
+ android:padding="@dimen/text_padding"
+ android:text="User"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvLocationParent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="20dp"
+ android:layout_marginTop="36dp"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvLocationParent">
@@ -161,6 +174,7 @@
android:layout_height="wrap_content"
android:text="TextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextViewTextView"
app:layout_constraintTop_toBottomOf="@+id/tvDescriptionLabel" />
+
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
@@ -177,9 +191,9 @@
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
- android:scaleType="centerCrop"
android:layout_weight="1"
android:backgroundTint="@color/white"
+ android:scaleType="centerCrop"
android:src="@drawable/empty_star" />
<ImageButton
@@ -187,9 +201,9 @@
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
- android:scaleType="centerCrop"
android:layout_weight="1"
android:backgroundTint="@color/white"
+ android:scaleType="centerCrop"
android:src="@drawable/empty_star" />
<ImageButton
@@ -197,9 +211,9 @@
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
- android:scaleType="centerCrop"
android:layout_weight="1"
android:backgroundTint="@color/white"
+ android:scaleType="centerCrop"
android:src="@drawable/empty_star" />
<ImageButton
@@ -207,9 +221,9 @@
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
- android:scaleType="centerCrop"
android:layout_weight="1"
android:backgroundTint="@color/white"
+ android:scaleType="centerCrop"
android:src="@drawable/empty_star" />
<ImageButton
@@ -217,48 +231,48 @@
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
- android:scaleType="centerCrop"
android:layout_weight="1"
android:backgroundTint="@color/white"
+ android:scaleType="centerCrop"
android:src="@drawable/empty_star" />
<Button
android:id="@+id/submitRating"
android:layout_width="30dp"
android:layout_height="40dp"
+ android:layout_gravity="center_vertical"
android:layout_weight="1"
android:backgroundTint="@color/white"
android:text="ok"
- android:layout_gravity="center_vertical"
- android:textColor="@color/black"
- />
+ android:textColor="@color/black" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/linearLayout2">
+
<LinearLayout
+ android:id="@+id/postCommentLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:id="@+id/postCommentLayout"
android:orientation="horizontal"
- app:layout_constraintStart_toStartOf="parent" >
+ app:layout_constraintStart_toStartOf="parent">
+
<EditText
+ android:id="@+id/NewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:hint="Unesite komentar ovde"
- android:id="@+id/NewComment"
- />
+ android:hint="Unesite komentar ovde" />
<ImageButton
android:id="@+id/btnPostComment"
android:layout_width="50dp"
- android:scaleType="fitCenter"
android:layout_height="50dp"
- android:src="@drawable/post_comment"
- android:backgroundTint="@color/white"/>
+ android:backgroundTint="@color/white"
+ android:scaleType="fitCenter"
+ android:src="@drawable/post_comment" />
</LinearLayout>
@@ -266,26 +280,26 @@
android:id="@+id/tvCommentLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- app:layout_constraintTop_toBottomOf="@id/postCommentLayout"
android:padding="@dimen/text_padding"
android:text="Komentari"
- android:textStyle="bold" />
+ android:textStyle="bold"
+ app:layout_constraintTop_toBottomOf="@id/postCommentLayout" />
<TextView
android:id="@+id/tvCommentCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/text_padding"
- app:layout_constraintTop_toBottomOf="@id/postCommentLayout"
android:text="0"
- app:layout_constraintStart_toEndOf="@id/tvCommentLabel" />
+ app:layout_constraintStart_toEndOf="@id/tvCommentLabel"
+ app:layout_constraintTop_toBottomOf="@id/postCommentLayout" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvComments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:layout_constraintTop_toBottomOf="@id/tvCommentLabel"
- android:nestedScrollingEnabled="false">
+ android:nestedScrollingEnabled="false"
+ app:layout_constraintTop_toBottomOf="@id/tvCommentLabel">
</androidx.recyclerview.widget.RecyclerView>
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml
new file mode 100644
index 0000000..8762183
--- /dev/null
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".Activities.ActivityUserProfile">
+
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+
+ android:id="@+id/imageView3"
+ android:layout_width="match_parent"
+ android:layout_height="300dp"
+ android:foreground="@drawable/b3"
+ android:foregroundGravity="center_vertical|center|center_horizontal|fill"
+ android:src="@drawable/b3"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+
+ <com.google.android.material.imageview.ShapeableImageView
+
+ android:id="@+id/tvFragmentProfileInfoContainer"
+ android:layout_width="0dp"
+ android:layout_height="199dp"
+ android:layout_marginStart="20dp"
+ android:layout_marginTop="150dp"
+ android:layout_marginEnd="20dp"
+ android:adjustViewBounds="true"
+ android:background="@drawable/profile_view_background"
+
+ android:elevation="1dp"
+ android:scaleType="fitEnd"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@+id/imageView3"
+ app:shapeAppearanceOverlay="@style/imageViewRoundedEdge" />
+
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/cvFragmentHomePageProfile"
+ android:layout_width="140dp"
+ android:layout_height="140dp"
+ android:layout_gravity="center"
+ android:layout_marginTop="80dp"
+ android:elevation="10dp"
+ app:cardCornerRadius="250dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <ImageView
+
+ android:id="@+id/tvActivityProfileProfilePicture"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:elevation="10dp"
+ android:scaleType="centerCrop"
+ android:src="@drawable/ic_baseline_person_24"
+ tools:ignore="ContentDescription" />
+ </androidx.cardview.widget.CardView>
+
+ <View
+ android:id="@+id/divider"
+ android:layout_width="409dp"
+ android:layout_height="1dp"
+ android:background="?android:attr/listDivider"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/btnFragmentUserProfileShowPosts" />
+
+ <Button
+ android:id="@+id/btnFragmentUserProfileShowPosts"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="20dp"
+ android:layout_marginTop="4dp"
+ android:backgroundTint="#FFFFFF"
+ android:stateListAnimator="@null"
+ android:text="Objave"
+
+ android:textColor="@color/cardview_dark_background"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvFragmentProfileInfoContainer" />
+
+ <Button
+ android:id="@+id/btnFragmentUserProfileShowData"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:layout_marginEnd="20dp"
+ android:backgroundTint="#FFFFFF"
+ android:stateListAnimator="@null"
+ android:text="Podaci"
+
+ android:textColor="@color/cardview_dark_background"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toEndOf="@+id/btnFragmentUserProfileShowRecensions"
+ app:layout_constraintTop_toBottomOf="@+id/tvFragmentProfileInfoContainer" />
+
+ <Button
+ android:id="@+id/btnFragmentUserProfileShowRecensions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="36dp"
+ android:layout_marginTop="4dp"
+ android:backgroundTint="#FFFFFF"
+ android:stateListAnimator="@null"
+ android:text="Recenzije"
+ android:textColor="@color/cardview_dark_background"
+ app:layout_constraintStart_toEndOf="@+id/btnFragmentUserProfileShowPosts"
+ app:layout_constraintTop_toBottomOf="@+id/tvFragmentProfileInfoContainer" />
+
+ <FrameLayout
+ android:id="@+id/flFragmentProfileFragmentContainer"
+ android:layout_width="409dp"
+ android:layout_height="319dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@+id/divider">
+ </FrameLayout>
+
+ <TableLayout
+
+ android:layout_width="363dp"
+
+ android:layout_height="122dp"
+ android:layout_marginStart="30dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="30dp"
+ android:layout_marginBottom="8dp"
+ android:elevation="1dp"
+ android:numColumns="3"
+
+ android:stretchColumns="1"
+ app:layout_constraintBottom_toBottomOf="@+id/tvFragmentProfileInfoContainer"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/cvFragmentHomePageProfile">
+
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_column="1">
+
+ <TextView
+ android:id="@+id/tvActivityUserProfileName"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_column="1"
+ android:layout_gravity="center"
+ android:layout_marginBottom="5dp"
+ android:text="Petar Petrović"
+ android:textSize="20sp" />
+ </TableRow>
+
+ <TableRow>
+
+ <androidx.constraintlayout.widget.ConstraintLayout android:layout_span="3">
+
+ <ImageButton
+
+ android:id="@+id/materialButton"
+ android:layout_width="115dp"
+ android:layout_height="40dp"
+ android:layout_marginStart="16dp"
+ android:background="@drawable/rounded_transparent_button"
+ android:foreground="@drawable/button_follow"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.0"
+ tools:ignore="TouchTargetSizeCheck" />
+
+ <ImageButton
+ android:layout_width="115dp"
+ android:layout_height="40dp"
+ android:layout_gravity="center"
+ android:layout_marginEnd="16dp"
+ android:height="40dp"
+ android:background="@drawable/rounded_transparent_button"
+ android:foreground="@drawable/button_chat"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.0"
+ tools:ignore="SpeakableTextPresentCheck" />
+ </androidx.constraintlayout.widget.ConstraintLayout>
+ </TableRow>
+
+
+ <TableRow android:layout_marginTop="5dp">
+
+ <TextView
+ android:id="@+id/tvFragmentUserProfilePosts"
+ android:layout_width="110dp"
+ android:gravity="center"
+ android:text="OBJAVE" />
+
+ <TextView
+ android:id="@+id/tvFragmentUserProfileFollowers"
+ android:layout_width="10dp"
+ android:gravity="center"
+ android:text="PRATIOCI" />
+
+ <TextView
+ android:id="@+id/tvFragmentUserProfileFollow"
+
+ android:layout_width="110dp"
+ android:gravity="center"
+ android:text="PRAĆENJA" />
+ </TableRow>
+
+ <TableRow>
+
+ <TextView
+ android:id="@+id/tvActivityUserProfilePostsNo"
+ android:layout_width="110dp"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:text="156"
+ android:textFontWeight="700" />
+
+ <TextView
+ android:id="@+id/tvActivityUserProfileFollowersNo"
+ android:layout_width="110dp"
+ android:gravity="center"
+ android:text="50" />
+
+ <TextView
+ android:id="@+id/tvActivityUserProfileFollowNo"
+ android:layout_width="110dp"
+ android:gravity="center"
+ android:text="40" />
+
+ </TableRow>
+
+ </TableLayout>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+</FrameLayout> \ No newline at end of file