Skip to content

Commit

Permalink
Merge pull request #90 from FOR-GRAD/21-졸업-요건-ui
Browse files Browse the repository at this point in the history
21 졸업 요건 UI
  • Loading branch information
dkyuuum authored Feb 15, 2024
2 parents 509be44 + 03a3626 commit 24b9c03
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import umc.com.mobile.project.ui.home.viewmodel.HomeViewModel
class HomeFragment : Fragment() {
private var _binding: FragmentHomeBinding? = null
private val viewModel: HomeViewModel by viewModels()
private val gradDateViewModel: GradDateViewModel by activityViewModels()
// private val gradDateViewModel: GradDateViewModel by activityViewModels()
private val binding get() = _binding!!

override fun onCreateView(
Expand All @@ -39,7 +39,7 @@ class HomeFragment : Fragment() {
viewModel.getUserInfo() // 홈 화면 정보 조회 api

navigateFragment()
saveCheeringMemo() // 응원의 한마디 연결
// saveCheeringMemo() // 응원의 한마디 연결
setupRecyclerView() // recyclerView 연결
setupHomeInfoRetrofit() // 홈 화면 ui 연결

Expand All @@ -48,7 +48,7 @@ class HomeFragment : Fragment() {

override fun onPause() {
super.onPause()
saveCheeringMemo()
// saveCheeringMemo()
}

override fun onDestroyView() {
Expand All @@ -66,11 +66,12 @@ class HomeFragment : Fragment() {
}
}

/*
private fun saveCheeringMemo() {
gradDateViewModel.dateResponse.observe(viewLifecycleOwner, Observer {
binding.tvCheeringWord.text = it?.result?.message
})
}
*/

private fun setupRecyclerView() {
val adapter = NextPlanRVAdapter()
Expand Down
66 changes: 66 additions & 0 deletions app/src/main/res/layout/fragment_plan_time.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.gridlayout.widget.GridLayout 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_margin="16dp"
android:background="#FAF3EB"
android:padding="16dp"
app:alignmentMode="alignMargins"
app:columnCount="3"
app:rowCount="4">

<!-- Column Headers -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text="분류"
app:layout_columnWeight="1" />

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text="교과목"
app:layout_columnWeight="1" />

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="4dp"
android:text="학점"
app:layout_columnWeight="1" />

<!-- EditText Rows -->
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/edittext_bottom_line"
android:hint=""
android:padding="4dp"
app:layout_columnWeight="1" />

<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/edittext_bottom_line"
android:hint=""
android:padding="4dp"
app:layout_columnWeight="1"

/>

<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_columnWeight="1"
android:background="@drawable/edittext_bottom_line"
android:hint=""
android:padding="4dp" />

<!-- 추가적인 TextView 또는 EditText 행들을 여기에 추가하면 됩니다 -->
</androidx.gridlayout.widget.GridLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_planlicense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
app:layout_gravity="fill"
app:layout_rowWeight="1"
android:gravity="center"
/>
/>

<EditText
android:id="@+id/plan_license_date"
Expand Down
130 changes: 65 additions & 65 deletions app/src/main/res/layout/plan_subject_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,73 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appCompatImageView_subject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="29dp"
android:layout_marginBottom="50dp"
android:background="@drawable/time_subject_two_button"
android:paddingBottom="10dp"

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="parent"
app:layout_constraintVertical_bias="0.0">





<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/plan_subject_list_semester"
style="@style/MediumFont.13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/rectangle_4343"
android:gravity="center"
android:text="학기선택"
android:layout_marginTop="16dp"
android:layout_marginLeft="35dp"
app:layout_constraintTop_toTopOf="@id/appCompatImageView_subject"
app:layout_constraintStart_toStartOf="@id/appCompatImageView_subject"


/>

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/plan_subject_list_track"
style="@style/MediumFont.13"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/appCompatImageView_subject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rectangle_4343"
android:gravity="center"
app:layout_constraintEnd_toEndOf="@id/appCompatImageView_subject"
app:layout_constraintTop_toTopOf="@id/appCompatImageView_subject"
android:layout_marginTop="14dp"
android:layout_marginRight="35dp"
android:text="트랙선택"
android:layout_marginTop="29dp"
android:layout_marginBottom="50dp"
android:background="@drawable/time_subject_two_button"
android:paddingBottom="10dp"

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="parent"
app:layout_constraintVertical_bias="0.0">





<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/plan_subject_list_semester"
style="@style/MediumFont.13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/rectangle_4343"
android:gravity="center"
android:text="학기선택"
android:layout_marginTop="16dp"
android:layout_marginLeft="21dp"
app:layout_constraintTop_toTopOf="@id/appCompatImageView_subject"
app:layout_constraintStart_toStartOf="@id/appCompatImageView_subject"


/>

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/plan_subject_list_track"
style="@style/MediumFont.13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/rectangle_4343"
android:gravity="center"
app:layout_constraintEnd_toEndOf="@id/appCompatImageView_subject"
app:layout_constraintTop_toTopOf="@id/appCompatImageView_subject"
android:layout_marginTop="14dp"
android:layout_marginRight="26dp"
android:text="트랙선택"
app:layout_constraintStart_toEndOf="@id/plan_subject_list_semester"

/>

</androidx.constraintlayout.widget.ConstraintLayout>


<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appCompatImageView_subject"
tools:listitem="@layout/item_time_subject" />


/>

</androidx.constraintlayout.widget.ConstraintLayout>


<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appCompatImageView_subject"
tools:listitem="@layout/item_time_subject" />


</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
38 changes: 27 additions & 11 deletions app/src/main/res/layout/semester_choose.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/semester_choose_const"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">


<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/semester_title"
style="@style/SemiBoldFont.16"
Expand All @@ -26,7 +19,32 @@

/>


<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:id="@+id/semester_all_click"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@drawable/semester_all_choose"-->
<!-- android:text="전체선택"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/semester_title"-->
<!-- app:layout_constraintEnd_toStartOf="@id/semester_all_cancle"-->
<!-- android:gravity="center"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginTop="15dp"-->

<!-- />-->

<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:id="@+id/semester_all_cancle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@drawable/semester_all_choose"-->
<!-- android:text="전체취소"-->
<!-- android:gravity="center"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@id/semester_title"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginTop="15dp"-->
<!-- />-->

<androidx.appcompat.widget.AppCompatImageButton
android:layout_width="wrap_content"
Expand Down Expand Up @@ -67,6 +85,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>




</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
16 changes: 10 additions & 6 deletions app/src/main/res/navigation/mobile_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,19 @@
android:name="umc.com.mobile.project.ui.setting.SettingNotificationFragment"
android:label="@string/title_setting_notification"
tools:layout="@layout/fragment_setting_notification" />

<fragment
android:id="@+id/planSettingFragment"
android:name="umc.com.mobile.project.ui.plan.PlanSettingFragment"
android:label="plan_time_tab_main"
tools:layout="@layout/plan_time_tab_main" />
tools:layout="@layout/plan_time_tab_main" >
<action
android:id="@+id/action_planSettingFragment_to_planSemesterFragment"
app:destination="@id/planSemesterFragment" />
</fragment>
<fragment
android:id="@+id/planSemesterFragment"
android:name="umc.com.mobile.project.ui.plan.PlanSemesterFragment"
android:label="PlanSemesterFragment" />
<fragment
android:id="@+id/planTimeFragment"
android:name="umc.com.mobile.project.ui.plan.PlanTimeFragment"
Expand All @@ -247,8 +254,5 @@
android:id="@+id/action_planTimeFragment_to_planSemesterFragment"
app:destination="@id/planSemesterFragment" />
</fragment>
<fragment
android:id="@+id/planSemesterFragment"
android:name="umc.com.mobile.project.ui.plan.PlanSemesterFragment"
android:label="PlanSemesterFragment" />

</navigation>

0 comments on commit 24b9c03

Please sign in to comment.