Skip to content

Commit

Permalink
#74 [ui] 환경설정 뷰 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed Jul 18, 2022
1 parent e583e7f commit a7064a3
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 9 deletions.
14 changes: 8 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".SettingActivity"
android:exported="false" />
android:name=".ui.profile.SettingActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.newrules.NewRuleActivity"
android:exported="false" />
Expand All @@ -35,11 +41,7 @@
<activity
android:name=".ui.main.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package com.hous.hous_aos.ui.profile

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.hous.hous_aos.R
import com.hous.hous_aos.databinding.ActivitySettingBinding

class SettingActivity : AppCompatActivity() {
private lateinit var binding: ActivitySettingBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_setting)
binding = ActivitySettingBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.ivSettingAlarm.setOnClickListener { it.isSelected = !it.isSelected }
}
}
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/ic_alarmoff_red_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFDEDE" android:pathData="M17,22a6.908,6.908 0,0 1,3.491 -6.053A6.81,6.81 0,0 1,24 15c1.275,0 2.444,0.316 3.509,0.947a6.809,6.809 0,0 1,2.544 2.544A6.81,6.81 0,0 1,31 22v9L17,31v-9zM33,31h-4v-2h4v2zM15,29h4v2h-4v-2zM25.737,32c0.246,0.468 0.316,0.936 0.21,1.404a1.942,1.942 0,0 1,-0.701 1.157A1.929,1.929 0,0 1,24 35c-0.468,0 -0.883,-0.146 -1.246,-0.439a2.061,2.061 0,0 1,-0.701 -1.157c-0.106,-0.468 -0.036,-0.936 0.21,-1.404h3.474zM22,16c0,-0.363 0.088,-0.696 0.263,-1 0.187,-0.304 0.433,-0.544 0.737,-0.72 0.316,-0.186 0.65,-0.28 1,-0.28 0.363,0 0.696,0.094 1,0.28 0.304,0.176 0.544,0.416 0.72,0.72 0.186,0.304 0.28,0.637 0.28,1v1.263c-1.064,-0.175 -1.731,-0.263 -2,-0.263 -0.269,0 -0.936,0.088 -2,0.263L22,16z"/>
</vector>
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/ic_alarmon_red_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#F66" android:pathData="M17,22a6.908,6.908 0,0 1,3.491 -6.053A6.81,6.81 0,0 1,24 15c1.275,0 2.444,0.316 3.509,0.947a6.809,6.809 0,0 1,2.544 2.544A6.81,6.81 0,0 1,31 22v9L17,31v-9zM33,31h-4v-2h4v2zM15,29h4v2h-4v-2zM25.737,32c0.246,0.468 0.316,0.936 0.21,1.404a1.942,1.942 0,0 1,-0.701 1.157A1.929,1.929 0,0 1,24 35c-0.468,0 -0.883,-0.146 -1.246,-0.439a2.061,2.061 0,0 1,-0.701 -1.157c-0.106,-0.468 -0.036,-0.936 0.21,-1.404h3.474zM22,16c0,-0.363 0.088,-0.696 0.263,-1 0.187,-0.304 0.433,-0.544 0.737,-0.72 0.316,-0.186 0.65,-0.28 1,-0.28 0.363,0 0.696,0.094 1,0.28 0.304,0.176 0.544,0.416 0.72,0.72 0.186,0.304 0.28,0.637 0.28,1v1.263c-1.064,-0.175 -1.731,-0.263 -2,-0.263 -0.269,0 -0.936,0.088 -2,0.263L22,16z"/>
</vector>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/hous_yellow" />
<corners android:radius="15dp" />
<stroke
android:width="1dp"
android:color="@color/hous_red" />
</shape>
98 changes: 98 additions & 0 deletions app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,104 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="20dp"
tools:context=".ui.profile.SettingActivity">

<ImageView
android:id="@+id/iv_setting_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="48dp"
android:src="@drawable/ic_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_setting_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_semibold"
android:text="Settings"
android:textColor="@color/g_7"
android:textSize="18sp"
android:textStyle="normal"
app:layout_constraintBottom_toBottomOf="@+id/iv_setting_back"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/iv_setting_back" />

<TextView
android:id="@+id/tv_setting_alarm"
style="@style/B1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="62dp"
android:text="알림"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_setting_title" />

<ImageView
android:id="@+id/iv_setting_alarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sel_setting_alarm"
app:layout_constraintBottom_toBottomOf="@+id/tv_setting_alarm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_setting_alarm" />

<ImageView
android:id="@+id/iv_setting_feedback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_next"
app:layout_constraintBottom_toBottomOf="@+id/tv_setting_system"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_setting_system" />

<ImageView
android:id="@+id/iv_setting_system"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_next"
app:layout_constraintBottom_toBottomOf="@+id/tv_setting_feedback"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_setting_feedback" />

<TextView
android:id="@+id/tv_setting_system"
style="@style/B1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="시스템 설정"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="@+id/tv_setting_alarm"
app:layout_constraintTop_toBottomOf="@+id/tv_setting_alarm" />

<TextView
android:id="@+id/tv_setting_feedback"
style="@style/B1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="피드백 보내기"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_setting_system" />

<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="24dp"
android:background="@drawable/shape_red_stroke_15_rect"
android:gravity="center"
android:text="퇴사하기"
android:textColor="@color/hous_red"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit a7064a3

Please sign in to comment.