183 lines
6.6 KiB
XML
183 lines
6.6 KiB
XML
<?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> |