diff options
author | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-11-01 12:41:50 +0100 |
---|---|---|
committer | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-11-01 12:41:50 +0100 |
commit | 6d5bc4fce9d818f50b8387650a4ac1adda677cfb (patch) | |
tree | 8f34257531a08ff7ed6e53f6e2bc8b013434848d /Client | |
parent | 544695029bca77f688a708677f4861d8df17ae9d (diff) |
Podešen izgled Login i Register stranice. Dodati resursi za podešavanje izgleda.
Diffstat (limited to 'Client')
13 files changed, 186 insertions, 50 deletions
diff --git a/Client/BrzoDoLokacije/app/src/debug/res/drawable-xhdpi/b1.jpg b/Client/BrzoDoLokacije/app/src/debug/res/drawable-xhdpi/b1.jpg Binary files differnew file mode 100644 index 0000000..6c86a45 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/debug/res/drawable-xhdpi/b1.jpg diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt index c80992c..f5843aa 100644 --- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt @@ -1,11 +1,14 @@ package com.example.brzodolokacije.Activities +import android.graphics.drawable.Drawable +import android.os.Build import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.View import android.widget.Button import android.widget.Toast +import androidx.annotation.RequiresApi import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentTransaction @@ -20,6 +23,8 @@ class ActivityLoginRegister : AppCompatActivity() { private lateinit var register: Button + + @RequiresApi(Build.VERSION_CODES.M) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_login_register) @@ -33,6 +38,10 @@ class ActivityLoginRegister : AppCompatActivity() { fm.replace(R.id.flFragmentActivityLRFragmentsView,FragmentLogin()) fm.commit() login.setOnClickListener{ + login.setTextColor(getColor(R.color.white)) + register.setTextColor(getColor(R.color.teal_700)) + login.setBackgroundResource(R.drawable.rounded_cyan_button) + register.setBackgroundResource(R.drawable.rounded_transparent_button) Log.d("main","prijavi se") var fm: FragmentTransaction =supportFragmentManager.beginTransaction() @@ -42,7 +51,10 @@ class ActivityLoginRegister : AppCompatActivity() { register.setOnClickListener{ Log.d("main","prijavi se") - + register.setTextColor(getColor(R.color.white)) + login.setTextColor(getColor(R.color.teal_700)) + register.setBackgroundResource(R.drawable.rounded_cyan_button) + login.setBackgroundResource(R.drawable.rounded_transparent_button) var fm: FragmentTransaction =supportFragmentManager.beginTransaction() fm.replace(R.id.flFragmentActivityLRFragmentsView, FragmentRegister()) diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/button_left_radius.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/button_left_radius.xml new file mode 100644 index 0000000..8ab5223 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/button_left_radius.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#CCFFFFFF"/> + <stroke android:width="2dp" android:color="#FF1C789A"/> + + <corners + android:topLeftRadius="100dp" + android:topRightRadius="0dp" + android:bottomLeftRadius="100dp" + android:bottomRightRadius="0dp" + /> +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/button_right_radius.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/button_right_radius.xml new file mode 100644 index 0000000..9b1ac29 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/button_right_radius.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#CCFFFFFF"/> + <stroke android:width="2dp" android:color="#FF1C789A"/> + + <corners + android:topLeftRadius="0dp" + android:topRightRadius="100dp" + android:bottomLeftRadius="0dp" + android:bottomRightRadius="100dp" + /> +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/gradient.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/gradient.xml new file mode 100644 index 0000000..0e20af4 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/gradient.xml @@ -0,0 +1,12 @@ +<shape + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <gradient + android:type="linear" + android:startColor="#260D62A9" + android:endColor="#D9063739" + android:angle="270" + /> + +</shape> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_bottom_radius.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_bottom_radius.xml new file mode 100644 index 0000000..ac29f68 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_bottom_radius.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#CCFFFFFF"/> + + <padding android:left="2dp" + android:top="2dp" + android:right="2dp" + android:bottom="2dp"/> + + <corners + android:topLeftRadius="0dp" + android:topRightRadius="0dp" + android:bottomLeftRadius="30dp" + android:bottomRightRadius="30dp" + /> +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_top_radius.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_top_radius.xml new file mode 100644 index 0000000..5d71138 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/login_register_background_top_radius.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#CCFFFFFF"/> + <padding android:left="2dp" + android:top="2dp" + android:right="2dp" + android:bottom="2dp"/> + + <corners + android:topLeftRadius="30dp" + android:topRightRadius="30dp" + android:bottomLeftRadius="0dp" + android:bottomRightRadius="0dp" + /> +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_transparent_button.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_transparent_button.xml new file mode 100644 index 0000000..5b420a0 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_transparent_button.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <corners android:radius="100dp"/> + <solid android:color="#00FFFFFF"></solid> +</shape> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml index 60f4b4d..1a4c57d 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml @@ -1,16 +1,7 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="250dp" - android:height="45dp" - android:viewportWidth="251" - android:viewportHeight="36"> +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#FFFFFF"/> + <corners android:radius="100dp"/> + <stroke android:width="2dp" android:color="#FF1C789A"/> - - <path - android:fillColor="#FFFFFFFF" - android:strokeColor="#FF1C789A" - android:strokeWidth="1" - android:pathData="M0.5 18c0-9.66 7.84-17.5 17.5-17.5h215c9.66 0 17.5 7.84 17.5 17.5v0c0 9.66-7.84 17.5-17.5 17.5h-215c-9.66 0-17.5-7.84-17.5-17.5z"/> - <path - android:fillColor="#FF1C789A" - android:pathData="M54.2 24V13.1h3.89c0.85 0 1.55 0.15 2.1 0.45 0.56 0.31 0.98 0.74 1.26 1.27s0.41 1.13 0.41 1.8c0 0.67-0.14 1.28-0.42 1.81-0.27 0.54-0.7 0.96-1.25 1.27-0.56 0.31-1.26 0.46-2.1 0.46H55.4v-1.4h2.52c0.54 0 0.97-0.08 1.3-0.27 0.34-0.19 0.59-0.44 0.74-0.76 0.16-0.33 0.24-0.7 0.24-1.1 0-0.42-0.08-0.79-0.24-1.1-0.15-0.32-0.4-0.57-0.74-0.76-0.33-0.18-0.77-0.27-1.32-0.27h-2.07V24H54.2Zm9.6 0V13.1h3.88c0.85 0 1.55 0.14 2.1 0.43 0.57 0.29 0.99 0.7 1.26 1.2 0.28 0.52 0.42 1.1 0.42 1.78 0 0.67-0.14 1.26-0.42 1.76-0.28 0.5-0.7 0.9-1.26 1.18-0.56 0.28-1.26 0.42-2.1 0.42h-2.95v-1.42h2.8c0.53 0 0.96-0.07 1.3-0.22 0.33-0.16 0.58-0.38 0.74-0.67 0.15-0.3 0.23-0.64 0.23-1.05 0-0.41-0.08-0.77-0.24-1.07-0.15-0.3-0.4-0.53-0.74-0.7-0.33-0.16-0.77-0.24-1.31-0.24h-2.07V24h-1.65Zm5.38-4.92l2.7 4.92H70l-2.64-4.92h1.82Zm5.93-5.99V24h-1.65V13.1h1.65Zm6.63 0h1.64v7.74c0 0.7-0.13 1.3-0.41 1.79-0.27 0.5-0.66 0.88-1.16 1.14-0.5 0.26-1.08 0.39-1.74 0.39-0.62 0-1.17-0.11-1.66-0.34-0.49-0.22-0.87-0.55-1.16-0.97-0.28-0.43-0.42-0.95-0.42-1.57h1.64c0 0.3 0.07 0.57 0.2 0.79 0.15 0.22 0.34 0.39 0.59 0.51 0.25 0.12 0.53 0.18 0.85 0.18 0.35 0 0.64-0.07 0.88-0.21 0.25-0.15 0.43-0.37 0.56-0.66 0.13-0.29 0.2-0.64 0.2-1.05v-7.74ZM86.7 24h-1.75l3.93-10.9h1.9L94.71 24h-1.75l-3.08-8.93h-0.09L86.7 24Zm0.3-4.27h5.66v1.38H87v-1.38Zm9.1-6.64l3.03 8.89h0.12l3.04-8.89h1.78L100.14 24h-1.9l-3.92-10.9h1.77Zm11.19 0V24h-1.65V13.1h1.65Zm12.32 2.87c-0.06-0.5-0.3-0.9-0.7-1.18-0.42-0.28-0.94-0.42-1.56-0.42-0.45 0-0.84 0.08-1.16 0.22-0.33 0.14-0.58 0.33-0.77 0.57-0.17 0.24-0.26 0.52-0.26 0.83 0 0.26 0.06 0.48 0.18 0.67 0.12 0.19 0.29 0.35 0.48 0.47 0.2 0.13 0.42 0.23 0.65 0.32 0.23 0.08 0.46 0.15 0.67 0.2l1.07 0.28c0.34 0.08 0.7 0.2 1.07 0.34 0.36 0.15 0.7 0.34 1.01 0.58 0.32 0.24 0.57 0.53 0.76 0.88 0.2 0.35 0.3 0.78 0.3 1.27 0 0.61-0.17 1.16-0.49 1.64-0.31 0.48-0.77 0.86-1.38 1.14-0.6 0.27-1.32 0.41-2.17 0.41-0.82 0-1.53-0.13-2.13-0.39-0.6-0.26-1.06-0.62-1.4-1.1-0.33-0.48-0.52-1.05-0.56-1.7h1.66c0.03 0.39 0.16 0.72 0.38 0.98 0.23 0.26 0.52 0.45 0.87 0.58 0.35 0.13 0.74 0.19 1.17 0.19 0.46 0 0.87-0.08 1.24-0.22 0.36-0.15 0.65-0.36 0.86-0.62 0.2-0.27 0.31-0.58 0.31-0.93 0-0.32-0.09-0.59-0.27-0.8-0.19-0.2-0.43-0.37-0.74-0.5-0.31-0.14-0.66-0.26-1.05-0.36l-1.3-0.35c-0.87-0.24-1.56-0.6-2.07-1.05-0.5-0.47-0.76-1.08-0.76-1.84 0-0.62 0.17-1.17 0.5-1.64 0.35-0.47 0.81-0.83 1.4-1.1 0.58-0.26 1.23-0.39 1.97-0.39 0.73 0 1.39 0.13 1.95 0.4 0.57 0.25 1.02 0.6 1.34 1.06 0.33 0.45 0.5 0.97 0.51 1.56h-1.58Zm3.7 8.04V13.1h6.84v1.4h-5.2v3.33h4.84v1.41h-4.83v3.34h5.25V24h-6.9Z"/> - </vector>
\ No newline at end of file +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml index ac526e0..92b84a0 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml @@ -5,39 +5,97 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="0dp" - android:foregroundGravity="fill" - android:foregroundTint="#5E010F13" - android:foregroundTintMode="add" + android:background="@drawable/b1" tools:context=".Activities.ActivityLoginRegister"> - <Button - android:id="@+id/btnFragmentActivityLRLogin" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:elevation="1dp" - android:text="Prijavi se" - app:layout_constraintEnd_toStartOf="@+id/btnFragmentActivityLRRegister" - app:layout_constraintHorizontal_bias="0.846" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - <Button - android:id="@+id/btnFragmentActivityLRRegister" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="52dp" - android:elevation="100dp" - android:text="Registruj se" + <ImageView + android:id="@+id/imageView2" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0" + app:srcCompat="@drawable/gradient" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:background="@drawable/login_register_background_top_radius" + + android:id="@+id/linearLayout" + android:layout_width="0dp" + android:layout_height="55dp" + android:layout_marginStart="50dp" + android:layout_marginEnd="50dp" + android:gravity="center|center_horizontal" + android:orientation="horizontal" + app:layout_constraintBottom_toTopOf="@+id/flFragmentActivityLRFragmentsView" + app:layout_constraintEnd_toEndOf="@+id/imageView2" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0"> + + <ImageView + android:id="@+id/imageView5" + android:layout_width="280dp" + android:layout_height="40dp" + android:background="@drawable/rounded_white_button_login" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0"></ImageView> + + <android.widget.Button + android:id="@+id/btnFragmentActivityLRLogin" + android:layout_width="139dp" + android:layout_height="40dp" + android:background="@drawable/rounded_cyan_button" + android:elevation="25dp" + android:padding="0dp" + + android:text="Prijavi se" + android:textColor="@color/white" + app:layout_constraintBottom_toBottomOf="@+id/imageView5" + app:layout_constraintEnd_toStartOf="@+id/btnFragmentActivityLRRegister" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="@+id/imageView5" + app:layout_constraintTop_toTopOf="@+id/imageView5" /> + + <android.widget.Button + android:id="@+id/btnFragmentActivityLRRegister" + android:layout_width="140dp" + android:layout_height="40dp" + android:textColor="#FF1C789A" + android:background="@drawable/rounded_transparent_button" + android:elevation="25dp" + android:padding="0dp" + android:text="Registruj se" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="@+id/imageView5" + app:layout_constraintTop_toTopOf="@+id/imageView5" + app:layout_constraintVertical_bias="0.0" /> + + </androidx.constraintlayout.widget.ConstraintLayout> <FrameLayout android:id="@+id/flFragmentActivityLRFragmentsView" android:layout_width="0dp" - android:layout_height="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="50dp" + android:layout_marginEnd="50dp" + android:background="@drawable/login_register_background_bottom_radius" + android:elevation="20dp" + android:foregroundGravity="center_vertical|center" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/btnFragmentActivityLRLogin"> + app:layout_constraintTop_toTopOf="@+id/imageView2" + app:layout_constraintVertical_bias="0.411"> + </FrameLayout> + + </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml index 9a9702a..c45051b 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml @@ -4,21 +4,21 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_gravity="center_horizontal" tools:context=".Fragments.FragmentLogin"> <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="400dp" - android:layout_height="352dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:padding="20dp" - > + + android:padding="20dp"> <TextView android:id="@+id/tvFragimentLoginEmail" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" - android:backgroundTint="#00B8D4" android:text="Email" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -45,8 +45,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/etFragmentLoginEmail" - /> + app:layout_constraintTop_toBottomOf="@+id/etFragmentLoginEmail" /> <EditText android:id="@+id/etFragmentLoginPassword" diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_register.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_register.xml index 3280aed..c9d50a0 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_register.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_register.xml @@ -4,15 +4,18 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".Fragments.FragmentRegister"> + tools:context=".Fragments.FragmentRegister" + android:layout_gravity="center_horizontal" + +> <!-- TODO: Update blank fragment layout --> <androidx.constraintlayout.widget.ConstraintLayout - android:padding="20dp" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_gravity="center_horizontal"> + android:layout_height="432dp" + android:layout_gravity="center_horizontal" + android:padding="20dp"> <EditText android:id="@+id/etFragmentRegisterPassword" diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml b/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml index 250df8e..588b9cf 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml @@ -7,4 +7,5 @@ <color name="teal_700">#FF018786</color> <color name="black">#FF000000</color> <color name="white">#FFFFFFFF</color> + </resources>
\ No newline at end of file |