Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ package io.mapomi.android.ui.main.post.detail
import dagger.hilt.android.lifecycle.HiltViewModel
import io.mapomi.android.ui.base.BaseViewModel
import javax.inject.Inject
import android.widget.EditText
import io.mapomi.android.model.post.PostModel
import io.mapomi.android.ui.main.post.adapter.PostDateAdapter
import io.mapomi.android.utils.TimeUtil
import kotlinx.coroutines.flow.MutableStateFlow

@HiltViewModel
class PostDetailViewModel @Inject constructor() : BaseViewModel() {
class PostDetailViewModel @Inject constructor() : BaseViewModel(
) {
}
220 changes: 217 additions & 3 deletions app/src/main/res/layout/fragment_post_detail.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>

<variable
name="vm"
type="io.mapomi.android.ui.main.post.detail.PostDetailViewModel" />
<variable
name="postCont"
type="io.mapomi.android.constants.PostConstKt" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="-73dp"
tools:layout_editor_absoluteY="0dp">

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="@dimen/app_padding">


<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:background="@color/grey300" />


<TextView
style="@style/medium14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str_post_date"
android:textColor="@color/grey700" />

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:orientation="horizontal">

</androidx.appcompat.widget.LinearLayoutCompat>

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">

<TextView
style="@style/medium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingVertical="4dp"
android:text="2023년 5월 13일 토" />

</androidx.appcompat.widget.LinearLayoutCompat>

<TextView
style="@style/medium14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/str_post_time"
android:textColor="@color/grey700" />

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

</androidx.appcompat.widget.LinearLayoutCompat>

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">

<TextView
style="@style/medium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingVertical="4dp"
android:layout_marginTop="5dp"
android:text="오후 03:00" />

</androidx.appcompat.widget.LinearLayoutCompat>


<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
style="@style/medium14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="소요시간"
android:layout_marginBottom="7dp"
android:textColor="@color/grey500" />

<TextView
style="@style/regular14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="30분"
android:textColor="@color/main700" />

</androidx.appcompat.widget.LinearLayoutCompat>


<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">

<TextView
style="@style/medium14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/str_post_accompany"
android:textColor="@color/grey700" />

<TextView
style="@style/regular14"
isSelect="@{true}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/btn_post_input"
android:hint="@string/str_post_departure"
android:inputType="text"
android:paddingHorizontal="12dp"
android:paddingVertical="15dp"
android:text=""
android:textColorHint="@color/grey500" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:src="@drawable/ic_place_arrow" />

<EditText
style="@style/regular14"
isSelect="@{true}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/btn_post_input"
android:hint="@string/str_post_destination"
android:inputType="text"
android:paddingHorizontal="12dp"
android:paddingVertical="15dp"
android:textColorHint="@color/grey500" />

</androidx.appcompat.widget.LinearLayoutCompat>



<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="20dp"
android:background="@color/grey300" />

<TextView
style="@style/medium14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/str_post_request"
android:textColor="@color/grey700" />

<TextView
android:id="@+id/et_content"
style="@style/medium16"
android:layout_width="match_parent"
android:layout_height="180dp"
android:background="@null"
android:gravity="top"
android:hint="@string/str_post_request_hint"
android:inputType="textMultiLine"
android:maxLength="200"
android:maxLines="5"
android:paddingVertical="15dp"
android:textColorHint="@color/grey500" />

<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/linearLayoutCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingVertical="15dp"
app:layout_constraintBottom_toBottomOf="parent">

<include
layout="@layout/view_primary_button"
app:buttonText="@{@string/str_complete}"
app:enabled="@{true}" />

</androidx.appcompat.widget.LinearLayoutCompat>

</androidx.appcompat.widget.LinearLayoutCompat>

</androidx.core.widget.NestedScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>