Skip to content

Commit 9a52822

Browse files
committed
#1 [FEAT] : SEMINAR_1
1 parent f299589 commit 9a52822

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1545
-0
lines changed

.gitignore

+261
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin,macos
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,kotlin,macos
3+
4+
### Android ###
5+
# Built application files
6+
*.apk
7+
*.aar
8+
*.ap_
9+
*.aab
10+
11+
# Files for the ART/Dalvik VM
12+
*.dex
13+
14+
# Java class files
15+
*.class
16+
17+
# Generated files
18+
bin/
19+
gen/
20+
out/
21+
# Uncomment the following line in case you need and you don't have the release build type files in your app
22+
# release/
23+
24+
# Gradle files
25+
.gradle/
26+
build/
27+
28+
# Local configuration file (sdk path, etc)
29+
local.properties
30+
31+
# Proguard folder generated by Eclipse
32+
proguard/
33+
34+
# Log Files
35+
*.log
36+
37+
# Android Studio Navigation editor temp files
38+
.navigation/
39+
40+
# Android Studio captures folder
41+
captures/
42+
43+
# IntelliJ
44+
*.iml
45+
.idea/workspace.xml
46+
.idea/tasks.xml
47+
.idea/gradle.xml
48+
.idea/assetWizardSettings.xml
49+
.idea/dictionaries
50+
.idea/libraries
51+
.idea/jarRepositories.xml
52+
# Android Studio 3 in .gitignore file.
53+
.idea/caches
54+
.idea/modules.xml
55+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
56+
.idea/navEditor.xml
57+
58+
# Keystore files
59+
# Uncomment the following lines if you do not want to check your keystore files in.
60+
#*.jks
61+
#*.keystore
62+
63+
# External native build folder generated in Android Studio 2.2 and later
64+
.externalNativeBuild
65+
.cxx/
66+
67+
# Google Services (e.g. APIs or Firebase)
68+
# google-services.json
69+
70+
# Freeline
71+
freeline.py
72+
freeline/
73+
freeline_project_description.json
74+
75+
# fastlane
76+
fastlane/report.xml
77+
fastlane/Preview.html
78+
fastlane/screenshots
79+
fastlane/test_output
80+
fastlane/readme.md
81+
82+
# Version control
83+
vcs.xml
84+
85+
# lint
86+
lint/intermediates/
87+
lint/generated/
88+
lint/outputs/
89+
lint/tmp/
90+
# lint/reports/
91+
92+
# Android Profiling
93+
*.hprof
94+
95+
### Android Patch ###
96+
gen-external-apklibs
97+
output.json
98+
99+
# Replacement of .externalNativeBuild directories introduced
100+
# with Android Studio 3.5.
101+
102+
### Kotlin ###
103+
# Compiled class file
104+
105+
# Log file
106+
107+
# BlueJ files
108+
*.ctxt
109+
110+
# Mobile Tools for Java (J2ME)
111+
.mtj.tmp/
112+
113+
# Package Files #
114+
*.jar
115+
*.war
116+
*.nar
117+
*.ear
118+
*.zip
119+
*.tar.gz
120+
*.rar
121+
122+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
123+
hs_err_pid*
124+
125+
### macOS ###
126+
# General
127+
.DS_Store
128+
.AppleDouble
129+
.LSOverride
130+
131+
# Icon must end with two \r
132+
Icon
133+
134+
135+
# Thumbnails
136+
._*
137+
138+
# Files that might appear in the root of a volume
139+
.DocumentRevisions-V100
140+
.fseventsd
141+
.Spotlight-V100
142+
.TemporaryItems
143+
.Trashes
144+
.VolumeIcon.icns
145+
.com.apple.timemachine.donotpresent
146+
147+
# Directories potentially created on remote AFP share
148+
.AppleDB
149+
.AppleDesktop
150+
Network Trash Folder
151+
Temporary Items
152+
.apdisk
153+
154+
### AndroidStudio ###
155+
# Covers files to be ignored for android development using Android Studio.
156+
157+
# Built application files
158+
159+
# Files for the ART/Dalvik VM
160+
161+
# Java class files
162+
163+
# Generated files
164+
165+
# Gradle files
166+
.gradle
167+
168+
# Signing files
169+
.signing/
170+
171+
# Local configuration file (sdk path, etc)
172+
173+
# Proguard folder generated by Eclipse
174+
175+
# Log Files
176+
177+
# Android Studio
178+
/*/build/
179+
/*/local.properties
180+
/*/out
181+
/*/*/build
182+
/*/*/production
183+
*.ipr
184+
*~
185+
*.swp
186+
187+
# Keystore files
188+
*.jks
189+
*.keystore
190+
191+
# Google Services (e.g. APIs or Firebase)
192+
# google-services.json
193+
194+
# Android Patch
195+
196+
# External native build folder generated in Android Studio 2.2 and later
197+
198+
# NDK
199+
obj/
200+
201+
# IntelliJ IDEA
202+
*.iws
203+
/out/
204+
205+
# User-specific configurations
206+
.idea/caches/
207+
.idea/libraries/
208+
.idea/shelf/
209+
.idea/.name
210+
.idea/compiler.xml
211+
.idea/copyright/profiles_settings.xml
212+
.idea/encodings.xml
213+
.idea/misc.xml
214+
.idea/scopes/scope_settings.xml
215+
.idea/vcs.xml
216+
.idea/jsLibraryMappings.xml
217+
.idea/datasources.xml
218+
.idea/dataSources.ids
219+
.idea/sqlDataSources.xml
220+
.idea/dynamic.xml
221+
.idea/uiDesigner.xml
222+
223+
# OS-specific files
224+
.DS_Store?
225+
ehthumbs.db
226+
Thumbs.db
227+
228+
# Legacy Eclipse project files
229+
.classpath
230+
.project
231+
.cproject
232+
.settings/
233+
234+
# Mobile Tools for Java (J2ME)
235+
236+
# Package Files #
237+
238+
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
239+
240+
## Plugin-specific files:
241+
242+
# mpeltonen/sbt-idea plugin
243+
.idea_modules/
244+
245+
# JIRA plugin
246+
atlassian-ide-plugin.xml
247+
248+
# Mongo Explorer plugin
249+
.idea/mongoSettings.xml
250+
251+
# Crashlytics plugin (for Android Studio and IntelliJ)
252+
com_crashlytics_export_strings.xml
253+
crashlytics.properties
254+
crashlytics-build.properties
255+
fabric.properties
256+
257+
### AndroidStudio Patch ###
258+
259+
!/gradle/wrapper/gradle-wrapper.jar
260+
261+
# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,kotlin,macos

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetDropDown.xml

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+96
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,99 @@
11
# Android-Seunghyeon
22

33
![github_한승현_ver1-7](https://user-images.githubusercontent.com/70698151/135753583-cb6d8b51-421f-48e2-9284-0bb3b70bb6d7.png)
4+
5+
#### 1차 세미나 과제
6+
7+
<hr>
8+
9+
#### 필수과제
10+
11+
* **GIF**
12+
13+
<img src="https://user-images.githubusercontent.com/81508084/136231628-7ac1b492-31db-4810-bce0-e6e518165e19.gif" width="30%" height="30%"/>
14+
15+
16+
* **SignInActivity**
17+
18+
* 로그인 버튼을 눌렀을 때, ID, PW가 모두 입력되어있을 시 HomeActivity로 이동하고 그렇지 않으면 Toast 출력
19+
20+
```kotlin
21+
private fun clickLogin() {
22+
if(!binding.etSigninId.text.isNullOrBlank() && !binding.etSigninPw.text.isNullOrBlank()) {
23+
Toast.makeText(this, "안녕하세요 ${binding.etSigninId.text}!", Toast.LENGTH_SHORT).show()
24+
val intent = Intent(this, HomeActivity::class.java)
25+
startActivity(intent)
26+
} else {
27+
Toast.makeText(this, "ID/PW를 확인해주세요!", Toast.LENGTH_SHORT).show()
28+
}
29+
}
30+
```
31+
32+
* ID, PW 입력 여부는 isNullOrBlank() 메서드를 활용하여 체크하였음
33+
* 각 조건문 분기마다 Toast 출력하였음
34+
35+
* 비밀번호 EditText는 입력 내용이 가려져 있어야하고, 모든 EditText는 미리보기가 있어야 함
36+
37+
```xml
38+
<EditText
39+
android:id="@+id/et_signin_pw"
40+
android:layout_width="0dp"
41+
android:layout_height="wrap_content"
42+
android:hint="@string/signin_hint_pw"
43+
android:inputType="textPassword"
44+
android:maxLines="1"
45+
android:ellipsize="end"
46+
app:layout_constraintBottom_toBottomOf="parent"
47+
app:layout_constraintEnd_toEndOf="parent"
48+
app:layout_constraintStart_toStartOf="parent"
49+
app:layout_constraintTop_toBottomOf="@id/tv_signin_pw" />
50+
```
51+
52+
* 모든 EditText마다 hint 속성을 활용하여 미리보기를 추가하였고, 비밀번호 EditText의 경우 inputType을 textPassword로 설정하여 입력 내용을 가렸음
53+
54+
* 회원가입 버튼을 누를 시 SignUpActivity로 이동
55+
56+
```kotlin
57+
private fun clickSignUp() {
58+
val intent = Intent(this, SignUpActivity::class.java)
59+
startActivity(intent)
60+
}
61+
```
62+
63+
* **SignUpActivity**
64+
65+
* 회원가입 버튼을 눌렀을 때, 이름, ID, PW가 모두 입력되어있을 시 SignInActivity로 다시 돌아가고 그렇지 않으면 Toast 출력
66+
67+
```kotlin
68+
private fun clickSignUp() {
69+
if(!binding.etSignupName.text.isNullOrBlank() && !binding.etSignupId.text.isNullOrBlank() && !binding.etSignupPw.text.isNullOrBlank()) {
70+
Toast.makeText(this, "회원가입이 완료되었습니다.", Toast.LENGTH_SHORT).show()
71+
finish()
72+
} else {
73+
Toast.makeText(this, "이름/ID/PW를 확인해주세요.", Toast.LENGTH_SHORT).show()
74+
}
75+
}
76+
```
77+
78+
* 이름, ID, PW 입력 여부는 isNullOrBlank() 메서드를 활용하여 체크하였음
79+
* 각 조건문 분기마다 Toast 출력하였음
80+
* finish() 메서드를 활용하여 이전 스택의 Activity로 복귀하였음
81+
82+
* 비밀번호 EditText는 입력 내용이 가려져 있어야하고, 모든 EditText는 미리보기가 있어야 함
83+
84+
```xml
85+
<EditText
86+
android:id="@+id/et_signup_pw"
87+
android:layout_width="0dp"
88+
android:layout_height="wrap_content"
89+
android:ellipsize="end"
90+
android:hint="@string/signin_hint_pw"
91+
android:inputType="textPassword"
92+
android:maxLines="1"
93+
app:layout_constraintBottom_toBottomOf="parent"
94+
app:layout_constraintEnd_toEndOf="parent"
95+
app:layout_constraintStart_toStartOf="parent"
96+
app:layout_constraintTop_toBottomOf="@id/tv_signup_pw" />
97+
```
98+
99+
* 모든 EditText마다 hint 속성을 활용하여 미리보기를 추가하였고, 비밀번호 EditText의 경우 inputType을 textPassword로 설정하여 입력 내용을 가렸음

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

0 commit comments

Comments
 (0)