xml files for layout

This commit is contained in:
saraklipaa 2025-12-15 15:37:53 +01:00
parent e3f465d925
commit 4746c230e1
19 changed files with 765 additions and 114 deletions

View File

@ -13,6 +13,10 @@
android:theme="@style/Theme.Gallery"
tools:targetApi="31"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".NewPostActivity"
android:exported="false"
tools:ignore="Instantiatable" />
<activity
android:name=".RegisterActivity"
android:exported="false" />

View File

@ -0,0 +1,4 @@
package com.example.gallery;
public class NewPostActivity {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#005b96"/>
<corners android:radius="12dp"/>
</shape>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="#011f4b"/>
<corners android:radius="12dp"/>
</shape>
</item>
<item>
<shape>
<solid android:color="#03396c"/>
<corners android:radius="12dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFF"/>
<corners android:radius="16dp"/>
<stroke
android:width="3dp"
android:color="#011f4b"/>
</shape>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#edf2fa"/>
<corners android:radius="12dp"/>
<stroke
android:width="2dp"
android:color="#011f4b"/>
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#03396c"
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#b3cde0"/>
<corners android:radius="12dp"/>
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<corners android:radius="40dp"/>
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#b3cde0"/>
<corners android:radius="22dp"/>
</shape>

View File

@ -5,44 +5,107 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor"
tools:context=".LoginActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="32dp"
android:background="@drawable/card_background"
android:elevation="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_percent="0.85">
<!-- Login Header -->
<TextView
android:id="@+id/loginHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login"
android:textSize="32sp"
android:textStyle="bold"
android:textColor="#011f4b"
android:gravity="center"
android:layout_marginBottom="40dp"/>
<!-- Username Section -->
<TextView
android:id="@+id/usernameTV"
android:layout_width="144dp"
android:layout_height="43dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Username"
android:textSize="21dp" />
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/usernameTxt"
android:layout_width="wrap_content"
android:layout_height="72dp"
android:hint="Korisničko ime" />
android:layout_width="match_parent"
android:layout_height="56dp"
android:hint="Username"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="24dp"
android:inputType="text"
android:maxLines="1"/>
<!-- Password Section -->
<TextView
android:id="@+id/userpasswordTV"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Password" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Password"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/userpasswordTxt"
android:layout_width="322dp"
android:layout_height="76dp"
android:hint="Lozinka" />
android:layout_width="match_parent"
android:layout_height="56dp"
android:hint="Password"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="32dp"
android:inputType="textPassword"
android:maxLines="1"/>
<!-- Login Button -->
<Button
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="Log in"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@drawable/button_background"
android:elevation="4dp"
android:stateListAnimator="@null"/>
<!-- Register Text -->
<TextView
android:id="@+id/registerTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Log in" />
android:text="Don't have an account? Register"
android:textSize="14sp"
android:textColor="#03396c"
android:gravity="center"
android:clickable="true"
android:focusable="true"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,11 +5,10 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor"
tools:context=".MainActivity">
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -24,22 +23,70 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:title="My App" />
android:background="@color/header"
android:elevation="4dp"
app:title="My App"
app:titleTextColor="#011f4b">
<!-- Your screen content here -->
<!-- Custom Toolbar Content -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_vertical">
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<!-- Filter Dropdown Spinner -->
<Spinner
android:id="@+id/filterButton"
android:layout_width="120dp"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_marginEnd="16dp"
android:spinnerMode="dropdown"
android:popupBackground="#b3cde0"/>
<!-- App Logo -->
<ImageView
android:id="@+id/appLogo"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@color/header"
android:layout_marginEnd="16dp"
android:contentDescription="App Logo"/>
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
<!-- Feed/Posts RecyclerView -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/postsRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:clipToPadding="false"/>
</LinearLayout>
<!-- Left sliding menu -->
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/bgColor"
app:headerLayout="@layout/nav_header"
app:menu="@menu/drawer_menu" />
</androidx.drawerlayout.widget.DrawerLayout>
<Button
android:id="@+id/Loginbtn"
android:layout_width="103dp"
@ -47,6 +94,7 @@
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="Log in"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -57,18 +105,19 @@
android:layout_marginStart="16dp"
android:layout_marginTop="76dp"
android:text="Register"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnLogout"
android:layout_width="103dp"
android:layout_height="51dp"
android:layout_width="101dp"
android:layout_height="58dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="Logout"
android:visibility="invisible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,130 @@
<?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=".NewPostActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/headerTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Create New Post"
android:textSize="24sp"
android:layout_marginBottom="24dp"/>
<TextView
android:id="@+id/titleLabelTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title"
android:textSize="16sp"/>
<EditText
android:id="@+id/titleET"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter post title"
android:inputType="text"
android:layout_marginBottom="16dp"/>
<TextView
android:id="@+id/descriptionLabelTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Description"
android:textSize="16sp"/>
<EditText
android:id="@+id/descriptionET"
android:layout_width="match_parent"
android:layout_height="120dp"
android:hint="Enter post description"
android:inputType="textMultiLine"
android:gravity="top"
android:layout_marginBottom="16dp"/>
<TextView
android:id="@+id/mediaTypeLabelTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Media Type"
android:textSize="16sp"/>
<RadioGroup
android:id="@+id/mediaTypeRG"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="16dp">
<RadioButton
android:id="@+id/photoRB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Photo"
android:checked="true"/>
<RadioButton
android:id="@+id/videoRB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Video"
android:layout_marginStart="24dp"/>
</RadioGroup>
<TextView
android:id="@+id/selectMediaLabelTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select Media"
android:textSize="16sp"/>
<Button
android:id="@+id/selectMediaBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Choose File"
android:layout_marginBottom="16dp"/>
<TextView
android:id="@+id/selectedFileTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="No file selected"
android:textSize="14sp"
android:layout_marginBottom="16dp"/>
<ImageView
android:id="@+id/previewIV"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:visibility="gone"
android:scaleType="centerCrop"
android:layout_marginBottom="16dp"
android:contentDescription="Preview"/>
<Button
android:id="@+id/submitBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Post"/>
<Button
android:id="@+id/cancelBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Cancel"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,101 +5,224 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgColor"
tools:context=".RegisterActivity">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="32dp"
android:background="@drawable/card_background"
android:elevation="8dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_percent="0.85"
app:layout_constraintVertical_bias="0.5">
<!-- Register Header -->
<TextView
android:id="@+id/registerHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Register"
android:textSize="32sp"
android:textStyle="bold"
android:textColor="#011f4b"
android:gravity="center"
android:layout_marginBottom="32dp"/>
<!-- Username Section -->
<TextView
android:id="@+id/usernameTextView"
android:layout_width="144dp"
android:layout_height="43dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Username"
android:textSize="21dp" />
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/usernameEditText"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_height="56dp"
android:hint="Username"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="20dp"
android:inputType="textPersonName"
android:maxLength="150" />
android:maxLength="150"
android:maxLines="1"/>
<!-- Email Section -->
<TextView
android:id="@+id/emailTextView"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Email Adresa" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Email Address"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/emailEditText"
android:layout_width="match_parent"
android:layout_height="61dp"
android:layout_height="56dp"
android:hint="Email"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="20dp"
android:inputType="textEmailAddress"
android:maxLength="254" />
android:maxLength="254"
android:maxLines="1"/>
<!-- Ime Section -->
<TextView
android:id="@+id/imeTextView"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Ime" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="First Name"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/imeEditText"
android:layout_width="match_parent"
android:layout_height="67dp"
android:layout_height="56dp"
android:hint="First Name"
android:maxLength="30" />
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="20dp"
android:maxLength="30"
android:maxLines="1"/>
<!-- Prezime Section -->
<TextView
android:id="@+id/prezimeTextView"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Prezime" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Last Name"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/prezimeEditText"
android:layout_width="match_parent"
android:layout_height="96dp"
android:layout_height="56dp"
android:hint="Last Name"
android:maxLength="30" />
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="20dp"
android:maxLength="30"
android:maxLines="1"/>
<!-- Index Section -->
<TextView
android:id="@+id/indexTextView"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Indeks" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="School ID"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/indexEditText"
android:layout_width="match_parent"
android:layout_height="67dp"
android:layout_height="56dp"
android:hint="School Index"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="20dp"
android:inputType="text"
android:maxLength="8" />
android:maxLength="8"
android:maxLines="1"/>
<!-- Password Section -->
<TextView
android:id="@+id/passwordTextView"
android:layout_width="126dp"
android:layout_height="31dp"
android:text="Password" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Password"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<EditText
android:id="@+id/passwordEditText"
android:layout_width="match_parent"
android:layout_height="59dp"
android:layout_height="56dp"
android:hint="Password"
android:textColorHint="#6497b1"
android:textColor="#011f4b"
android:background="@drawable/edit_text_background"
android:padding="16dp"
android:layout_marginBottom="28dp"
android:inputType="textPassword"
android:maxLength="128" />
android:maxLength="128"
android:maxLines="1"/>
<!-- Register Button -->
<Button
android:id="@+id/btnRegister"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="Register"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#FFFFFF"
android:background="@drawable/button_background"
android:elevation="4dp"
android:stateListAnimator="@null"
android:layout_marginBottom="24dp"/>
<!-- Login Text -->
<TextView
android:id="@+id/loginTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Register" />
android:text="Already have an account? Login"
android:textSize="14sp"
android:textColor="#03396c"
android:gravity="center"
android:clickable="true"
android:focusable="true"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,183 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:background="@drawable/card_background"
android:elevation="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_percent="0.92">
<!-- Post Header (User Info) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="16dp"
android:gravity="center_vertical">
<ImageView
android:id="@+id/postUserIcon"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/ic_profile"
android:background="@drawable/profile_circle_background_small"
android:padding="10dp"
android:layout_marginEnd="12dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/postUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Username"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#011f4b"/>
</LinearLayout>
<!-- Media Type Badge -->
<TextView
android:id="@+id/mediaTypeBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PHOTO"
android:textSize="11sp"
android:textStyle="bold"
android:textColor="#FFFFFF"
android:background="@drawable/badge_background"
android:paddingStart="14dp"
android:paddingEnd="14dp"
android:paddingTop="6dp"
android:paddingBottom="6dp"/>
</LinearLayout>
<!-- Divider -->
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#b3cde0"
android:layout_marginBottom="16dp"/>
<!-- Post Content/Image -->
<ImageView
android:id="@+id/postImage"
android:layout_width="match_parent"
android:layout_height="220dp"
android:scaleType="centerCrop"
android:background="@drawable/image_placeholder_background"
android:layout_marginBottom="16dp"
android:contentDescription="Post content"/>
<!-- Post Title -->
<TextView
android:id="@+id/postTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Post Title"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="#011f4b"
android:layout_marginBottom="8dp"/>
<!-- Post Description -->
<TextView
android:id="@+id/postDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Post description goes here..."
android:textSize="14sp"
android:textColor="#03396c"
android:layout_marginBottom="20dp"/>
<!-- Divider -->
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#b3cde0"
android:layout_marginBottom="20dp"/>
<!-- Average Rating Section -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Average Rating"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="8dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="24dp">
<RatingBar
android:id="@+id/averageRatingBar"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:rating="4.5"
android:isIndicator="true"
android:progressTint="#005b96"
android:scaleX="1.2"
android:scaleY="1.2"
android:layout_marginEnd="12dp"/>
<TextView
android:id="@+id/averageRatingText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4.5"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="#011f4b"/>
</LinearLayout>
<!-- User Rating Section -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your Rating"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="#03396c"
android:layout_marginBottom="12dp"/>
<RatingBar
android:id="@+id/userRatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1"
android:rating="0"
android:progressTint="#005b96"
android:scaleX="1.3"
android:scaleY="1.3"
android:layout_gravity="center"
android:transformPivotX="0dp"
android:transformPivotY="0dp"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@color/header"
android:orientation="vertical"
android:padding="24dp"
android:gravity="bottom">
<!-- Profile Icon -->
<ImageView
android:id="@+id/profileIcon"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/ic_profile"
android:background="@drawable/profile_circle_background"
android:padding="16dp"
android:layout_marginBottom="16dp"
android:contentDescription="Profile"/>
<!-- User Name -->
<TextView
android:id="@+id/userNameTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User Name"
android:textColor="#FFFFFF"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>

View File

@ -2,13 +2,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_home"
android:title="Log in"
/>
android:id="@+id/nav_new_post"
android:title="@string/new_post"/>
<item
android:id="@+id/menu_settings"
android:title="Register"
/>
android:id="@+id/nav_logout"
android:title="@string/logout"/>
</menu>

View File

@ -2,4 +2,6 @@
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="bgColor">#b3cde0</color>
<color name="header">#6497b1</color>
</resources>

View File

@ -1,3 +1,6 @@
<resources>
<string name="app_name">Gallery</string>
<string name="new_post">New Post</string>
<string name="logout">Logout</string>
<string name="title">Title</string>
</resources>