aboutsummaryrefslogtreecommitdiff
path: root/Client/BrzoDoLokacije/app/src/main/res/layout
diff options
context:
space:
mode:
authorJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-12-05 07:15:23 +0100
committerJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-12-05 07:15:23 +0100
commita18cd1c5439780e84fa983b62cdaef8445df4542 (patch)
treed075065abec39b9a635ca41a62130373ad40d77b /Client/BrzoDoLokacije/app/src/main/res/layout
parent9d9a6b56dcbfe5d1a1f1ad9ea61b28c59fb603a2 (diff)
Prepravljen izgled četa i liste četova, omogućeno vraćanje na pritisak dugmeta u uglu ekrana, dodat prikaz zadnje poruke i njenog datuma/vremena u listi četova #70
Diffstat (limited to 'Client/BrzoDoLokacije/app/src/main/res/layout')
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml31
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml134
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/chat_message.xml61
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/chat_message_other.xml62
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml61
5 files changed, 192 insertions, 157 deletions
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml
index 680bada..acdab4a 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml
@@ -18,16 +18,20 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
+<androidx.appcompat.widget.LinearLayoutCompat
+ android:layout_width="match_parent"
+ android:id="@+id/llHeader"
+ android:layout_height="50dp"
+ android:background="@color/unfollow">
- <ImageView
- android:id="@+id/btnActivityShowFollowersAndFollowingBackToUser"
- android:layout_width="35dp"
- android:layout_height="35dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
+ <ImageButton
+ android:id="@+id/btnBack"
+ android:layout_width="50dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
android:clickable="true"
android:src="@drawable/ic_baseline_arrow_back"
- android:textAllCaps="false"
+ android:background="@null"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
@@ -36,13 +40,20 @@
android:id="@+id/tvActivityShowFollowersOrFollowingShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:layout_marginEnd="268dp"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
android:text="Poruke"
android:textSize="25dp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+<!--
+ <ImageButton
+ android:layout_width="50dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"/>-->
+
+</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeContainer"
@@ -50,7 +61,7 @@
android:layout_height="0dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/tvActivityShowFollowersOrFollowingShow"
+ app:layout_constraintTop_toBottomOf="@+id/llHeader"
app:layout_constraintVertical_bias="1.0"
tools:layout_editor_absoluteX="-27dp">
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml
index 72060f7..4dcab31 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml
@@ -1,69 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.appcompat.widget.LinearLayoutCompat 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:orientation="vertical"
android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
tools:context=".Activities.ChatActivityConversation">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/topBanner"
- android:layout_width="match_parent"
- android:layout_height="50dp"
- android:elevation="5dp"
- android:background="@color/dark_blue_transparent"
- android:clickable="true"
- app:layout_constraintStart_toStartOf="parent">
-
- <TextView
- android:id="@+id/tvFragmentTitle"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="Chat"
- android:textColor="@color/white"
- android:textSize="40dp" />
- <androidx.cardview.widget.CardView
- android:id="@+id/cvParentUsername"
+ <androidx.appcompat.widget.LinearLayoutCompat
+ android:id="@+id/topBanner"
android:layout_width="match_parent"
- android:layout_height="40dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="10dp"
- android:layout_marginEnd="16dp"
- android:elevation="0dp"
- app:cardCornerRadius="20dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
-
-
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/etReceiverUsername"
- android:layout_width="match_parent"
+ android:elevation="5dp"
+ android:layout_height="50dp"
+ android:background="@color/unfollow">
+ <ImageButton
+ android:id="@+id/btnBack"
+ android:layout_width="50dp"
android:layout_height="match_parent"
- android:background="@drawable/rounded_white_button_login"
- android:hint=" kome slati poruku?"
- android:inputType="textPersonName"
- android:paddingLeft="15dp" />
+ android:layout_gravity="center_vertical"
+ android:clickable="true"
+ android:src="@drawable/ic_baseline_arrow_back"
+ android:background="@null"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
+
+ <androidx.appcompat.widget.LinearLayoutCompat
+ android:layout_width="match_parent"
+ android:id="@+id/llHeader"
+ android:layout_height="50dp">
+ <ImageView
+ android:id="@+id/ivUserImage"
+ android:layout_width="50dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_nav_profile"
+ android:padding="5dp"
+ android:scaleType="centerCrop"/>
+ <TextView
+ android:id="@+id/tvFragmentTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:text="Chat"
+ android:textSize="20dp" />
+ </androidx.appcompat.widget.LinearLayoutCompat>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/cvParentUsername"
+ android:layout_width="wrap_content"
+ android:layout_height="40dp"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:elevation="0dp"
+ app:cardCornerRadius="20dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/etReceiverUsername"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/rounded_white_button_login"
+ android:hint=" kome slati poruku?"
+ android:inputType="textPersonName"
+ android:paddingLeft="15dp" />
+
+
+ </androidx.cardview.widget.CardView>
+ </androidx.appcompat.widget.LinearLayoutCompat>
- </androidx.cardview.widget.CardView>
- </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/messagesContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:layout_constraintBottom_toTopOf="@id/cvParentMessageEdit"
- app:layout_constrainedHeight="true">
+ android:animateLayoutChanges="true"
+ android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvMain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:layout_constraintBottom_toBottomOf="parent"
- >
+ app:layout_constraintBottom_toBottomOf="parent">
</androidx.recyclerview.widget.RecyclerView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -72,14 +97,12 @@
android:id="@+id/cvParentMessageEdit"
android:layout_width="match_parent"
android:layout_height="40dp"
+ android:layout_marginBottom="5dp"
android:layout_marginStart="16dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="16dp"
android:elevation="0dp"
- app:cardCornerRadius="20dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent">
+ app:cardCornerRadius="20dp">
<com.google.android.material.textfield.TextInputEditText
@@ -89,16 +112,21 @@
android:background="@drawable/rounded_white_button_login"
android:hint=" poruka"
android:inputType="textPersonName"
- android:paddingLeft="15dp" />
+ android:paddingLeft="15dp"
+ tools:ignore="TouchTargetSizeCheck"
+ android:autofillHints="emailAddress"/>
<ImageButton
android:id="@+id/btnSendMessage"
- android:layout_width="49dp"
- android:layout_height="50dp"
- android:layout_gravity="right"
+ android:layout_width="25dp"
+ android:layout_height="25dp"
+ android:layout_gravity="right|center_vertical"
android:scaleType="centerCrop"
+ android:layout_marginEnd="10dp"
+ android:background="@null"
android:src="@drawable/post_comment"
- app:cornerRadius="16dp" />
+ app:cornerRadius="16dp"
+ tools:ignore="SpeakableTextPresentCheck" />
</androidx.cardview.widget.CardView>
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+</androidx.appcompat.widget.LinearLayoutCompat> \ No newline at end of file
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message.xml
index 7858e94..f7ef08c 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message.xml
@@ -1,42 +1,15 @@
<?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:id="@+id/clMessage"
android:layout_margin="@dimen/text_padding"
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="end">
-
- <androidx.cardview.widget.CardView
- android:id="@+id/cardView"
- android:layout_width="wrap_content"
- android:layout_height="30dp"
- android:backgroundTint="@color/unfollow"
- android:elevation="5dp"
- app:cardCornerRadius="15dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
-
- <com.google.android.material.textview.MaterialTextView
-
- android:id="@+id/tvMessage"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:background="@drawable/view_corner_radius"
- android:backgroundTint="@color/unfollow"
- android:padding="5dp"
- android:text="blabla"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ android:layout_width="match_parent">
<TextView
android:id="@+id/tvDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="32dp"
android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
@@ -45,23 +18,31 @@
android:textColor="#C0C0C0"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"/>
<androidx.cardview.widget.CardView
android:id="@+id/cvContainer"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:cardBackgroundColor="@color/dark_blue_transparent"
- app:cardCornerRadius="12dp"
- app:cardElevation="0dp"
- app:cardPreventCornerOverlap="false"
- app:cardUseCompatPadding="true"
+ android:minWidth="40dp"
+ android:layout_height="30dp"
+ android:layout_marginBottom="10dp"
+ android:layout_marginLeft="10dp"
+ android:backgroundTint="@color/unfollow"
+ app:cardCornerRadius="15dp"
+ android:background="@drawable/view_corner_radius"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toBottomOf="@id/tvDate">
-
-
-
-
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvDate">
+
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/tvMessage"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:backgroundTint="@color/unfollow"
+ android:padding="5dp"
+ android:paddingHorizontal="15dp"
+ android:text="blabla"
+ app:layout_constraintEnd_toEndOf="parent" />
</androidx.cardview.widget.CardView>
<TextView
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message_other.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message_other.xml
index aaabd86..b076cf8 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message_other.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_message_other.xml
@@ -1,78 +1,58 @@
<?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"
-
- xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/clMessage"
- android:layout_width="wrap_content"
android:layout_height="wrap_content"
-
- android:layout_marginStart="8dp"
- android:layout_marginTop="16dp">
+ android:layout_width="match_parent">
<TextView
android:id="@+id/tvDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="32dp"
- android:elevation="10dp"
-
+ android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp"
android:text="June 10"
android:textColor="#C0C0C0"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"/>
<androidx.cardview.widget.CardView
android:id="@+id/cvContainer"
android:layout_width="wrap_content"
+ android:minWidth="40dp"
android:layout_height="30dp"
- android:layout_margin="5dp"
- android:elevation="5dp"
- app:cardCornerRadius="10dp"
+ android:layout_marginBottom="10dp"
+ android:layout_marginLeft="10dp"
+ android:backgroundTint="#eef1f6"
+ android:background="@drawable/view_corner_radius"
+ app:cardCornerRadius="15dp"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
-
-
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvDate">
- <LinearLayout
- android:id="@+id/llContainer"
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/tvMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- android:id="@+id/tvMessage"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="5dp"
- android:text="blabla"
- app:cardBackgroundColor="#eef1f6"
- app:cardCornerRadius="12dp"
- app:cardElevation="0dp"
- app:cardPreventCornerOverlap="false"
- app:cardUseCompatPadding="true"
- app:layout_constraintTop_toBottomOf="@+id/tvDate"/>
-
- </LinearLayout>
-
+ android:backgroundTint="#eef1f6"
+ android:padding="5dp"
+ android:paddingHorizontal="15dp"
+ android:text="blabla"
+ app:layout_constraintEnd_toEndOf="parent" />
</androidx.cardview.widget.CardView>
-
<TextView
android:id="@+id/tvTimestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginTop="-5dp"
- android:text="8:00"
+ android:text="10:00"
android:textColor="#C0C0C0"
android:textSize="10sp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/tvDate" />
+ app:layout_constraintBottom_toBottomOf="@+id/cvContainer"
+ app:layout_constraintStart_toEndOf="@+id/cvContainer" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml
index 35431ff..c995b4b 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml
@@ -1,19 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="70dp"
+ android:padding="5dp"
xmlns:app="http://schemas.android.com/apk/res-auto">
- <androidx.appcompat.widget.AppCompatImageView
- android:layout_width="50dp"
- android:layout_height="50dp"
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="5dp"
+ android:id="@+id/readIndicator"
+ android:layout_height="5dp"
+ android:layout_gravity="center_vertical"/>
+ <ImageView
android:id="@+id/ivUserImage"
- android:src="@drawable/ic_nav_profile"/>
- <TextView
+ android:layout_width="70dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_nav_profile"
+ android:padding="5dp"
+ android:scaleType="centerCrop"/>
+ <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:id="@+id/tvUsername"
- android:textSize="@dimen/header1_size"
- android:textColor="@color/black"
- app:layout_constraintStart_toEndOf="@id/ivUserImage"/>
-
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <androidx.appcompat.widget.LinearLayoutCompat
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/tvUsername"
+ android:layout_weight="1"
+ android:textSize="@dimen/header1_size"
+ android:textColor="@color/black"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/tvLastMessageDate"
+ android:text="1/1/1"
+ android:textSize="@dimen/header2_size"
+ android:textColor="@color/unfollow"/>
+ </androidx.appcompat.widget.LinearLayoutCompat>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/tvLastMessage"
+ android:text="hej, sta ima novo?"
+ android:layout_weight="1"
+ android:gravity="center_vertical"
+ android:textAlignment="gravity"
+ android:textSize="@dimen/header2_size"
+ android:textColor="@color/unfollow"/>
+ </androidx.appcompat.widget.LinearLayoutCompat>
+</androidx.appcompat.widget.LinearLayoutCompat> \ No newline at end of file