diff options
14 files changed, 226 insertions, 338 deletions
diff --git a/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml index 0c412d8..2241c80 100644 --- a/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml +++ b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml @@ -37,9 +37,17 @@ android:usesCleartextTraffic="true" tools:targetApi="31"> <activity + android:name=".Activities.ActivityShowFollowersAndFollowing" + android:exported="false" + android:screenOrientation="portrait"> + <meta-data + android:name="android.app.lib_name" + android:value="" /> + </activity> + <activity android:name=".Activities.ActivityUserProfile" android:exported="false" - android:screenOrientation="portrait" > + android:screenOrientation="portrait"> <meta-data android:name="android.app.lib_name" android:value="" /> @@ -47,8 +55,8 @@ <activity android:name=".Activities.ChatActivityConversation" android:exported="false" - android:windowSoftInputMode="stateVisible|adjustPan" - android:screenOrientation="portrait" > + android:screenOrientation="portrait" + android:windowSoftInputMode="stateVisible|adjustPan"> <meta-data android:name="android.app.lib_name" android:value="" /> @@ -56,11 +64,10 @@ <activity android:name=".Activities.ChatActivity" android:exported="true" - android:screenOrientation="portrait" > + android:screenOrientation="portrait"> <meta-data android:name="android.app.lib_name" android:value="" /> - </activity> <meta-data diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityShowFollowersAndFollowing.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityShowFollowersAndFollowing.kt new file mode 100644 index 0000000..845021e --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityShowFollowersAndFollowing.kt @@ -0,0 +1,39 @@ +package com.example.brzodolokacije.Activities + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import android.widget.Button +import android.widget.FrameLayout +import androidx.fragment.app.FragmentTransaction +import com.example.brzodolokacije.Fragments.FragmentFollowers +import com.example.brzodolokacije.Fragments.FragmentFollowing +import com.example.brzodolokacije.Fragments.FragmentRegister +import com.example.brzodolokacije.R + +class ActivityShowFollowersAndFollowing : AppCompatActivity() { + + private lateinit var showFollowers:Button + private lateinit var showFollowing:Button + private lateinit var fragmentContainer:FrameLayout + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_show_followers_and_following) + + showFollowers=findViewById(R.id.btnActivityShowFollowersAndFollowingShowFollowers) + showFollowing=findViewById(R.id.btnActivityShowFollowersAndFollowingShowFollowing) + fragmentContainer=findViewById(R.id.flActivityShowFollowerAndFollowing) + + showFollowers.setOnClickListener { + var fm: FragmentTransaction =supportFragmentManager.beginTransaction() + fm.replace(R.id.flActivityShowFollowerAndFollowing, FragmentFollowers()) + fm.commit() + } + + showFollowing.setOnClickListener { + var fm: FragmentTransaction =supportFragmentManager.beginTransaction() + fm.replace(R.id.flActivityShowFollowerAndFollowing, FragmentFollowing()) + fm.commit() + } + + } +}
\ No newline at end of file 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 56e9190..2d290db 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 @@ -11,11 +11,16 @@ import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment import com.bumptech.glide.Glide import com.example.brzodolokacije.Fragments.FragmentShowUserPosts +import com.example.brzodolokacije.Models.PostPreview import com.example.brzodolokacije.Models.User 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.google.gson.Gson +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response class ActivityUserProfile : AppCompatActivity() { private lateinit var name:TextView @@ -36,7 +41,7 @@ class ActivityUserProfile : AppCompatActivity() { followersNumber=findViewById(R.id.tvActivityUserProfileFollowersNo) followingNumber=findViewById(R.id.tvActivityUserProfileFollowNo) profilePicture=findViewById(R.id.tvActivityProfileProfilePicture) - followUser=findViewById(R.id.ibActivityUserProfileFollow) + followUser=findViewById(R.id.btnActivityUserProfileFollow) showUserPosts=findViewById(R.id.btnActivityUserProfileShowPosts) fragmentContainer=findViewById(R.id.flActivityProfileFragmentContainer) @@ -60,6 +65,9 @@ class ActivityUserProfile : AppCompatActivity() { } followUser.setOnClickListener{ + val api = RetrofitHelper.getInstance() + val token= SharedPreferencesHelper.getValue("jwt", this@ActivityUserProfile) + api.addFollower("Bearer "+token,myObject._id); } diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentProfile.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentProfile.kt index 7c6d998..3427658 100644 --- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentProfile.kt +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentProfile.kt @@ -214,8 +214,8 @@ class FragmentProfile : Fragment(com.example.brzodolokacije.R.layout.fragment_pr username.setText("@"+user.username) postsCount.setText(user.postcount.toString()) - followersCount.setText("to do") - followingCount.setText("to do") + followersCount.setText(user.followersNumber.toString()) + followingCount.setText(user.followingNumber.toString()) userId=user._id diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentUserProfile.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentUserProfile.kt deleted file mode 100644 index 2635adb..0000000 --- a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentUserProfile.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.example.brzodolokacije.Fragments - -import android.os.Bundle -import androidx.fragment.app.Fragment -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import com.example.brzodolokacije.R - -class FragmentUserProfile : Fragment() { - - - override fun onCreateView( - inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - - val view= inflater.inflate(R.layout.fragment_user_profile, container, false) - - - - return view - } - - -}
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml index 09fe069..86ad75d 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_baseline_arrow_back_24.xml @@ -1,5 +1,5 @@ <vector android:autoMirrored="true" android:height="24dp" - android:tint="#274352" android:viewportHeight="24" + android:tint="#737374" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="@android:color/white" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> </vector> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_add_alt_24.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_add_alt_24.xml new file mode 100644 index 0000000..0c0ec5a --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_add_alt_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M20,9V6h-2v3h-3v2h3v3h2v-3h3V9H20zM9,12c2.21,0 4,-1.79 4,-4c0,-2.21 -1.79,-4 -4,-4S5,5.79 5,8C5,10.21 6.79,12 9,12zM9,6c1.1,0 2,0.9 2,2c0,1.1 -0.9,2 -2,2S7,9.1 7,8C7,6.9 7.9,6 9,6zM15.39,14.56C13.71,13.7 11.53,13 9,13c-2.53,0 -4.71,0.7 -6.39,1.56C1.61,15.07 1,16.1 1,17.22V20h16v-2.78C17,16.1 16.39,15.07 15.39,14.56zM15,18H3v-0.78c0,-0.38 0.2,-0.72 0.52,-0.88C4.71,15.73 6.63,15 9,15c2.37,0 4.29,0.73 5.48,1.34C14.8,16.5 15,16.84 15,17.22V18z"/> +</vector> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_remove_24.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_remove_24.xml new file mode 100644 index 0000000..3272d5e --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_outline_person_remove_24.xml @@ -0,0 +1,7 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M14,8c0,-2.21 -1.79,-4 -4,-4C7.79,4 6,5.79 6,8c0,2.21 1.79,4 4,4C12.21,12 14,10.21 14,8zM12,8c0,1.1 -0.9,2 -2,2c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2C11.1,6 12,6.9 12,8z"/> + <path android:fillColor="@android:color/white" android:pathData="M2,18v2h16v-2c0,-2.66 -5.33,-4 -8,-4C7.33,14 2,15.34 2,18zM4,18c0.2,-0.71 3.3,-2 6,-2c2.69,0 5.77,1.28 6,2H4z"/> + <path android:fillColor="@android:color/white" android:pathData="M17,10h6v2h-6z"/> +</vector> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_round_message_24.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_round_message_24.xml new file mode 100644 index 0000000..130c826 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_round_message_24.xml @@ -0,0 +1,5 @@ +<vector android:autoMirrored="true" android:height="24dp" + android:tint="#FFFFFF" android:viewportHeight="24" + android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM17,14L7,14c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1zM17,11L7,11c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1zM17,8L7,8c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1z"/> +</vector> diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_button.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_button.xml new file mode 100644 index 0000000..52d0c26 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_button.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <corners android:radius="20dp"/> +</shape>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_show_followers_and_following.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_show_followers_and_following.xml new file mode 100644 index 0000000..18c519b --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_show_followers_and_following.xml @@ -0,0 +1,68 @@ +<?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.ActivityShowFollowersAndFollowing"> + + <Button + android:id="@+id/btnActivityShowFollowersAndFollowingBackToUser" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:drawableLeft="@drawable/ic_baseline_arrow_back" + android:text="Korisnik" + + android:textAllCaps="false" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <View + android:id="@+id/divider" + android:layout_width="409dp" + android:layout_height="1dp" + android:layout_marginTop="4dp" + android:background="?android:attr/listDivider" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/btnActivityShowFollowersAndFollowingShowFollowers" /> + + <Button + android:id="@+id/btnActivityShowFollowersAndFollowingShowFollowers" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:backgroundTint="#FFFFFF" + android:stateListAnimator="@null" + android:text="Objave" + android:drawableBottom="@drawable/ic_baseline_circle_7" + android:textColor="@color/cardview_dark_background" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/btnActivityShowFollowersAndFollowingBackToUser" /> + + <Button + android:id="@+id/btnActivityShowFollowersAndFollowingShowFollowing" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="20dp" + android:backgroundTint="#FFFFFF" + android:stateListAnimator="@null" + android:text="Podaci" + android:drawableBottom="@drawable/ic_baseline_circle_7" + android:drawableTint="@color/white" + android:textColor="@color/cardview_dark_background" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/btnActivityShowFollowersAndFollowingBackToUser" /> + + <FrameLayout + android:id="@+id/flActivityShowFollowerAndFollowing" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_marginTop="16dp" + android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/divider"/> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file 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 index 16f4b1e..a446f9a 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_user_profile.xml @@ -15,7 +15,7 @@ android:id="@+id/imageView3" android:layout_width="match_parent" - android:layout_height="300dp" + android:layout_height="250dp" android:foreground="@drawable/b3" android:foregroundGravity="center_vertical|center|center_horizontal|fill" android:src="@drawable/b3" @@ -28,9 +28,9 @@ android:id="@+id/tvFragmentProfileInfoContainer" android:layout_width="0dp" - android:layout_height="199dp" + android:layout_height="240dp" android:layout_marginStart="20dp" - android:layout_marginTop="150dp" + android:layout_marginTop="120dp" android:layout_marginEnd="20dp" android:adjustViewBounds="true" android:background="@drawable/profile_view_background" @@ -46,10 +46,10 @@ <androidx.cardview.widget.CardView android:id="@+id/cvFragmentHomePageProfile" - android:layout_width="140dp" - android:layout_height="140dp" + android:layout_width="130dp" + android:layout_height="130dp" android:layout_gravity="center" - android:layout_marginTop="80dp" + android:layout_marginTop="60dp" android:elevation="10dp" app:cardCornerRadius="250dp" app:layout_constraintEnd_toEndOf="parent" @@ -125,17 +125,18 @@ android:layout_height="319dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="@+id/divider"> - </FrameLayout> + app:layout_constraintTop_toTopOf="@+id/divider" + app:layout_constraintVertical_bias="1.0"></FrameLayout> <TableLayout android:layout_width="363dp" - android:layout_height="122dp" + android:layout_height="wrap_content" android:layout_marginStart="30dp" - android:layout_marginTop="8dp" + android:layout_marginTop="5dp" android:layout_marginEnd="30dp" android:layout_marginBottom="8dp" android:elevation="1dp" @@ -145,7 +146,8 @@ app:layout_constraintBottom_toBottomOf="@+id/tvFragmentProfileInfoContainer" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/cvFragmentHomePageProfile"> + app:layout_constraintTop_toBottomOf="@+id/cvFragmentHomePageProfile" + app:layout_constraintVertical_bias="0.35000002"> <TableRow android:layout_width="match_parent" @@ -158,47 +160,13 @@ 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/ibActivityUserProfileFollow" - 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> + android:textStyle="bold" + android:textSize="23sp" /> </TableRow> - <TableRow android:layout_marginTop="5dp"> + <TableRow android:layout_marginTop="30dp"> <TextView android:id="@+id/tvFragmentUserProfilePosts" @@ -220,30 +188,81 @@ android:text="PRAĆENJA" /> </TableRow> - <TableRow> - + <TableRow + android:layout_height="wrap_content" + > <TextView android:id="@+id/tvActivityUserProfilePostsNo" android:layout_width="110dp" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:gravity="center" android:text="156" - android:textFontWeight="700" /> + android:textSize="20dp" + android:textStyle="bold" /> <TextView android:id="@+id/tvActivityUserProfileFollowersNo" android:layout_width="110dp" android:gravity="center" - android:text="50" /> + android:text="50" + android:textSize="20dp" + android:textStyle="bold"/> <TextView android:id="@+id/tvActivityUserProfileFollowNo" android:layout_width="110dp" android:gravity="center" - android:text="40" /> + android:text="40" + android:textSize="20dp" + android:textStyle="bold"/> </TableRow> + <TableRow + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + > + + <androidx.constraintlayout.widget.ConstraintLayout android:layout_span="3"> + + <Button + + android:id="@+id/btnActivityUserProfileFollow" + android:layout_width="0dp" + android:layout_height="30dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="8dp" + android:drawableLeft="@drawable/ic_outline_person_add_alt_24" + android:text="PRATI" + android:insetTop="0dp" + android:insetBottom="0dp" + app:shapeAppearanceOverlay="@style/Circular" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/activityUserProfileOpenChat" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.13" + tools:ignore="TouchTargetSizeCheck" /> + + <ImageButton + android:id="@+id/activityUserProfileOpenChat" + android:layout_width="35dp" + android:layout_height="30dp" + android:layout_gravity="center" + android:layout_marginEnd="16dp" + android:height="40dp" + android:background="@drawable/rounded_button" + android:backgroundTint="#4DB6AC" + android:src="@drawable/ic_round_message_24" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/btnActivityUserProfileFollow" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + app:shapeAppearanceOverlay="@style/Circular" + tools:ignore="SpeakableTextPresentCheck" /> + </androidx.constraintlayout.widget.ConstraintLayout> + </TableRow> </TableLayout> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_user_profile.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_user_profile.xml deleted file mode 100644 index 15031e3..0000000 --- a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_user_profile.xml +++ /dev/null @@ -1,248 +0,0 @@ -<?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=".Fragments.FragmentUserProfile"> - - - <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/tvFragmentProfileProfilePicture" - 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:elevation="1dp" - - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_marginStart="30dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="30dp" - android:layout_marginBottom="8dp" - 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_column="1"> - - <TextView - android:id="@+id/tvFragmentUserProfileName" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_column="1" - android:layout_gravity="center" - android:text="Petar Petrović" - android:textSize="20sp" - android:layout_marginBottom="5dp"/> - </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/tvFragmentUserProfilePostsNo" - android:layout_width="110dp" - android:gravity="center" - android:textFontWeight="700" - android:text="156" /> - - <TextView - android:id="@+id/tvFragmentUserProfileFollowersNo" - android:layout_width="110dp" - android:gravity="center" - android:text="50" /> - - <TextView - android:id="@+id/tvFragmentUserProfileFollowNo" - android:layout_width="110dp" - android:gravity="center" - android:text="40" /> - - </TableRow> - - </TableLayout> - - </androidx.constraintlayout.widget.ConstraintLayout> - - -</FrameLayout>
\ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/styles.xml b/Client/BrzoDoLokacije/app/src/main/res/values/styles.xml index 8fcd452..8c8a1fd 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/values/styles.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/values/styles.xml @@ -11,7 +11,7 @@ <item name="color">@color/white</item> </style> <style name="Circular"> - <item name="cornerSize">10dp</item> + <item name="cornerSize">12dp</item> </style> <style name="roundedBottom"> |