Skip to content

Commit

Permalink
Design: 홈 margin 수정 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
dkyuuum committed Feb 19, 2024
1 parent 2d85431 commit 9f272e5
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions app/src/main/java/umc/com/mobile/project/ui/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class HomeFragment : Fragment() {
binding.layoutNextPlan.setOnClickListener {
navigate(R.id.action_fragment_home_to_planSettingFragment)
}
binding.constraintLayout3.setOnClickListener {
navigate(R.id.action_fragment_home_to_planSettingFragment)
}
}

private fun setupRecyclerView() {
Expand All @@ -87,11 +90,9 @@ class HomeFragment : Fragment() {
/**
* 기본 정보
*/
binding.tvName.text = it?.result?.name
binding.tvStdId.text = it?.result?.id.toString()
binding.tvSchool.text = it?.result?.department
binding.tvGrade.text = it?.result?.grade
binding.tvStatus.text = it?.result?.status
binding.tvNameStdId.text = "${it?.result?.name} ${it?.result?.id.toString()}"
binding.tvSchool.text = "한성대학교 ${it?.result?.department}"
binding.tvGradeStatus.text = "${it?.result?.grade} ${it?.result?.status}"
binding.tvGraduateDday.text = it?.result?.dday.toString()
binding.tvCheeringWord.text = it?.result?.message

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
android:paddingTop="18dp"
android:paddingBottom="18dp"
android:singleLine="true"
android:text="@={vm.id}" />
android:text="@={vm.id}"
android:theme="@style/EditText.DarkMode" />

</androidx.appcompat.widget.LinearLayoutCompat>

Expand Down Expand Up @@ -114,7 +115,8 @@
android:paddingTop="18dp"
android:paddingBottom="18dp"
android:singleLine="true"
android:text="@={vm.pw}" />
android:text="@={vm.pw}"
android:theme="@style/EditText.DarkMode" />

<!-- </com.google.android.material.textfield.TextInputLayout>-->
</androidx.appcompat.widget.LinearLayoutCompat>
Expand Down
41 changes: 9 additions & 32 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</androidx.cardview.widget.CardView>

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_name"
android:id="@+id/tv_name_stdId"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -119,64 +119,41 @@
app:layout_constraintTop_toTopOf="@+id/cv_home_profile" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_stdId"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="30dp"
android:text="@{vm.userId}"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/tv_name"
app:layout_constraintTop_toTopOf="@+id/cv_home_profile" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_school_title"
android:id="@+id/tv_school"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="34dp"
android:layout_marginTop="23dp"
android:text="한성대학교"
android:layout_marginTop="13dp"
android:text="@{String.format(`한성대학교 %s`, vm.userDepart)}"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/cv_home_profile"
app:layout_constraintTop_toBottomOf="@+id/tv_name" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_school"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="23dp"
android:text="@{vm.userDepart}"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/tv_school_title"
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
app:layout_constraintTop_toBottomOf="@+id/tv_name_stdId" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_grade"
android:id="@+id/tv_grade_status"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="34dp"
android:layout_marginTop="13dp"
android:text="@{vm.userGrade}"
android:text="@{String.format(`%s %s`, vm.userGrade, vm.userStatus)}"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/cv_home_profile"
app:layout_constraintTop_toBottomOf="@+id/tv_school" />

<!--
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_status"
style="@style/BoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="34dp"
android:layout_marginTop="13dp"
android:text="@{vm.userStatus}"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/tv_grade"
app:layout_constraintTop_toBottomOf="@+id/tv_school" />
-->

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_cheering_word"
Expand Down
46 changes: 41 additions & 5 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,51 @@
<!-- Base application theme. -->
<style name="Theme.ForAGrade" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="android:statusBarColor">@color/white</item>
<item name="android:windowLightStatusBar">true</item>

<item name="android:windowIsTranslucent">true</item>
</style>
<!-- grad_date_bottom에 둥근 모서리 적용 -->
<style name="RoundCornerBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/RoundCornerModalStyle</item>
</style>

<style name="RoundCornerModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/white_round_top_border_20</item>
</style>

<!--Number Picker 색상 변경-->
<style name="Theme.AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">#FFFFFF</item>
<item name="colorPrimaryVariant">#FFFFFF</item>
<item name="colorOnPrimary">#FFFFFF</item>
</style>
<style name="ThemeOverlay.NumberPicker" parent="Theme.AppTheme">
<item name="colorControlNormal">#FFFFFF</item>
</style>

<!-- 앱 전체 화면 -->
<style name="FullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowFullscreen">true</item>
</style>

<!-- 커스텀 다이얼로그 -->
<style name="CustomAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@drawable/custom_dialog_background</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>

<style name="EditText.DarkMode" parent="Widget.AppCompat.EditText">
<item name="android:textColor">@color/black</item>
</style>

</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@
<item name="android:background">@drawable/custom_dialog_background</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>

<style name="EditText.DarkMode" parent="Widget.AppCompat.EditText">
<item name="android:textColor">@color/black</item>
</style>

</resources>

0 comments on commit 9f272e5

Please sign in to comment.