aboutsummaryrefslogtreecommitdiff
path: root/Client/BrzoDoLokacije/app/src/main/res/layout
diff options
context:
space:
mode:
authorJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-11-21 06:58:25 +0100
committerJelena Petrovic <jelenapetrovic.7119@gmail.com>2022-11-21 06:58:25 +0100
commit045d19f46a9a79971ab9b72cad62a6b0e27bac89 (patch)
treebfa45cd6fd60d5c768a41305ccc401fd8e03bef2 /Client/BrzoDoLokacije/app/src/main/res/layout
parentf7a12cb67dd4d9e041534a04633d633582f6e0a2 (diff)
omogucena komunikacija preko soketa (slanje i primanje poruka), pisanje poruka u sqllite bazu na telefonu, dodate minimalno odradjene komponente neophodne za pregled i slanje poruka #37
Diffstat (limited to 'Client/BrzoDoLokacije/app/src/main/res/layout')
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml42
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml82
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml18
-rw-r--r--Client/BrzoDoLokacije/app/src/main/res/layout/fragment_show_posts.xml13
4 files changed, 155 insertions, 0 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 093a95a..694e972 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat.xml
@@ -5,5 +5,47 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.ChatActivity">
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/topBanner"
+ android:layout_width="match_parent"
+ android:clickable="true"
+ android:layout_height="50dp"
+ android:background="@color/dark_blue_transparent"
+ app:layout_constraintStart_toStartOf="parent">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:textSize="40dp"
+ android:id="@+id/tvFragmentTitle"
+ android:text="Chat"
+ android:textColor="@color/white"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+ <ImageButton
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/addNewMessage"
+ android:clickable="true"
+ android:focusable="true"
+ app:layout_constraintTop_toBottomOf="@id/topBanner"
+ android:src="@drawable/button_chat">
+
+
+ </ImageButton>
+<!-- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:id="@+id/swipeContainer"
+ app:layout_constraintTop_toBottomOf="@id/addNewMessage">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/rvMain"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" >
+
+ </androidx.recyclerview.widget.RecyclerView>
+ </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
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
new file mode 100644
index 0000000..ea7d3e7
--- /dev/null
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_chat_conversation.xml
@@ -0,0 +1,82 @@
+<?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:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".Activities.ChatActivityConversation">
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/topBanner"
+ android:layout_width="match_parent"
+ android:clickable="true"
+ android:layout_height="50dp"
+ android:background="@color/dark_blue_transparent"
+ app:layout_constraintStart_toStartOf="parent">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:textSize="40dp"
+ android:id="@+id/tvFragmentTitle"
+ android:text="Chat"
+ android:textColor="@color/white"/>
+ <androidx.cardview.widget.CardView
+ android:id="@+id/cvParentUsername"
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:layout_marginTop="10dp"
+ android:layout_marginStart="16dp"
+ 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:layout_height="match_parent"
+ android:background="@drawable/rounded_white_button_login"
+ android:hint=" kome slati poruku?"
+ android:paddingLeft="15dp"
+ android:inputType="textPersonName" />
+
+
+ </androidx.cardview.widget.CardView>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+ <androidx.cardview.widget.CardView
+ android:id="@+id/cvParentMessageEdit"
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:layout_marginTop="10dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:elevation="0dp"
+ app:cardCornerRadius="20dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/etNewMessage"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/rounded_white_button_login"
+ android:hint=" poruka"
+ android:paddingLeft="15dp"
+ android:inputType="textPersonName" />
+
+ <ImageButton
+ android:id="@+id/btnSendMessage"
+ android:layout_width="49dp"
+ android:layout_height="50dp"
+ android:layout_gravity="right"
+ android:scaleType="centerCrop"
+ app:cornerRadius="16dp"
+ android:src="@drawable/post_comment" />
+
+ </androidx.cardview.widget.CardView>
+</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
new file mode 100644
index 0000000..95c036a
--- /dev/null
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/chat_preview.xml
@@ -0,0 +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="match_parent"
+ android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <androidx.appcompat.widget.AppCompatImageView
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:id="@+id/ivUserImage"/>
+ <TextView
+ 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
diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_show_posts.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_show_posts.xml
index 5dfbc98..6e22456 100644
--- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_show_posts.xml
+++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_show_posts.xml
@@ -73,6 +73,19 @@
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
+ android:id="@+id/btnChat"
+ android:layout_width="84dp"
+ android:layout_height="50dp"
+ android:layout_marginStart="8dp"
+ android:layout_weight="1"
+ android:background="@color/white"
+ android:padding="@dimen/component_padding"
+ android:scaleType="centerCrop"
+ android:src="@android:drawable/sym_action_chat"
+ app:layout_constraintStart_toEndOf="@+id/btnSortDirection"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <ImageButton
android:id="@+id/btnLinearLayout"
android:layout_width="50dp"
android:layout_height="50dp"