Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신기성
/
WELLO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Authored by
soonmyeong2
2019-10-22 20:44:18 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
dd9a2ebb652aa214facc19559e63973915ead32c
dd9a2ebb
2 parents
30b0bbe8
30e95558
merge splashScreen and loginNextPage
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
212 additions
and
18 deletions
README.md
vip/.idea/codeStyles/Project.xml
vip/.idea/vcs.xml
vip/app/src/main/AndroidManifest.xml
vip/app/src/main/java/com/example/vip/MainActivity.kt
vip/app/src/main/java/com/example/vip/MainMenuActivity.kt
vip/app/src/main/java/com/example/vip/Policy.kt
vip/app/src/main/java/com/example/vip/SignInActivity.kt
vip/app/src/main/java/com/example/vip/SignUpActivity.kt
vip/app/src/main/res/layout/activity_mainmenu.xml
vip/app/src/main/res/layout/activity_policy.xml
vip/app/src/main/res/layout/activity_signin.xml
vip/app/src/main/res/layout/activity_signup.xml
vip/build.gradle
README.md
View file @
dd9a2eb
# WELLO project
\ No newline at end of file
# WELLO project
## description
\ No newline at end of file
...
...
vip/.idea/codeStyles/Project.xml
View file @
dd9a2eb
<component
name=
"ProjectCodeStyleConfiguration"
>
<code_scheme
name=
"Project"
version=
"173"
>
<AndroidXmlCodeStyleSettings>
<option
name=
"ARRANGEMENT_SETTINGS_MIGRATED_TO_191"
value=
"true"
/>
</AndroidXmlCodeStyleSettings>
<JetCodeStyleSettings>
<option
name=
"CODE_STYLE_DEFAULTS"
value=
"KOTLIN_OFFICIAL"
/>
</JetCodeStyleSettings>
...
...
vip/.idea/vcs.xml
0 → 100644
View file @
dd9a2eb
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$/.."
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
vip/app/src/main/AndroidManifest.xml
View file @
dd9a2eb
...
...
@@ -11,7 +11,13 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<<<<<<
< HEAD
<activity
android:name=
".SplashActivity"
android:theme=
"@style/SplashTheme"
>
=======
<activity
android:name=
".SignInActivity"
></activity>
<activity
android:name=
".SignUpActivity"
/>
<activity
android:name=
".MainActivity"
>
>>>>>>> 30e9555883e1f0d8a1af31b839e6ed410407101f
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
vip/app/src/main/java/com/example/vip/MainActivity.kt
View file @
dd9a2eb
package
com.example.vip
import
android.content.Intent
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.widget.Toast
import
com.google.firebase.auth.FirebaseAuth
import
kotlinx.android.synthetic.main.activity_main.*
import
org.w3c.dom.Node
class
MainActivity
:
AppCompatActivity
()
{
...
...
@@ -12,19 +14,6 @@ class MainActivity : AppCompatActivity() {
private
val
firebaseAuth
=
FirebaseAuth
.
getInstance
()
// EmailCreate
private
fun
createEmail
(){
firebaseAuth
!!
.
createUserWithEmailAndPassword
(
edit_email
.
text
.
toString
(),
edit_password
.
text
.
toString
())
.
addOnCompleteListener
(
this
)
{
if
(
it
.
isSuccessful
)
{
// Sign in success, update UI with the signed-in user's information
val
user
=
firebaseAuth
?.
currentUser
Toast
.
makeText
(
this
,
"Authentication success."
,
Toast
.
LENGTH_SHORT
).
show
()
}
else
{
// If sign in fails, display a message to the user.
Toast
.
makeText
(
this
,
"Authentication failed."
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
// Email SignIn
private
fun
loginEmail
(){
...
...
@@ -34,9 +23,18 @@ class MainActivity : AppCompatActivity() {
// Sign in success, update UI with the signed-in user's information
Toast
.
makeText
(
this
,
"signInWithEmail success."
,
Toast
.
LENGTH_SHORT
).
show
()
val
user
=
firebaseAuth
?.
currentUser
if
(
user
!=
null
){
var
intent
=
Intent
(
this
,
SignInActivity
::
class
.
java
)
startActivity
(
intent
)
}
}
else
{
// If sign in fails, display a message to the user.
Toast
.
makeText
(
this
,
"signInWithEmail failed."
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
...
...
@@ -46,11 +44,18 @@ class MainActivity : AppCompatActivity() {
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_main
)
emailSignupBtn
.
setOnClickListener
{
createEmail
()
}
emailSigninBtn
.
setOnClickListener
{
loginEmail
()
}
emailSignupBtn
.
setOnClickListener
{
var
intent
=
Intent
(
this
,
SignUpActivity
::
class
.
java
)
startActivity
(
intent
)
}
}
}
...
...
vip/app/src/main/java/com/example/vip/MainMenuActivity.kt
0 → 100644
View file @
dd9a2eb
package
com.example.vip
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
class
MainMenuActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_main_menu
)
}
}
vip/app/src/main/java/com/example/vip/Policy.kt
0 → 100644
View file @
dd9a2eb
package
com.example.vip
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
class
Policy
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_policy
)
}
}
vip/app/src/main/java/com/example/vip/SignInActivity.kt
0 → 100644
View file @
dd9a2eb
package
com.example.vip
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
class
SignInActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_signin
)
}
}
vip/app/src/main/java/com/example/vip/SignUpActivity.kt
0 → 100644
View file @
dd9a2eb
package
com.example.vip
import
android.content.Intent
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.widget.Toast
import
com.google.firebase.auth.FirebaseAuth
import
kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.activity_signup.*
class
SignUpActivity
:
AppCompatActivity
()
{
private
val
RC_SIGN_IN
=
9001
private
val
firebaseAuth
=
FirebaseAuth
.
getInstance
()
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_signup
)
signupBtn
.
setOnClickListener
{
createEmail
()
var
intent
=
Intent
(
this
,
MainActivity
::
class
.
java
)
startActivity
(
intent
)
}
}
private
fun
createEmail
(){
firebaseAuth
!!
.
createUserWithEmailAndPassword
(
edit_email_sign_up
.
text
.
toString
(),
edit_password_sign_up
.
text
.
toString
())
.
addOnCompleteListener
(
this
)
{
if
(
it
.
isSuccessful
)
{
// Sign in success, update UI with the signed-in user's information
val
user
=
firebaseAuth
?.
currentUser
Toast
.
makeText
(
this
,
"회원가입 완료!"
,
Toast
.
LENGTH_SHORT
).
show
()
}
else
{
// If sign in fails, display a message to the user.
Toast
.
makeText
(
this
,
"회원가입 실패"
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
}
vip/app/src/main/res/layout/activity_mainmenu.xml
0 → 100644
View file @
dd9a2eb
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MainMenuActivity"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
vip/app/src/main/res/layout/activity_policy.xml
0 → 100644
View file @
dd9a2eb
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".Policy"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
vip/app/src/main/res/layout/activity_signin.xml
0 → 100644
View file @
dd9a2eb
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".SignInActivity"
>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"로그인완료"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
vip/app/src/main/res/layout/activity_signup.xml
0 → 100644
View file @
dd9a2eb
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".SignUpActivity"
>
<EditText
android:id=
"@+id/edit_email_sign_up"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginLeft=
"16dp"
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
android:ems=
"10"
android:hint=
"Email"
android:inputType=
"textEmailAddress"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<EditText
android:id=
"@+id/edit_password_sign_up"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginLeft=
"16dp"
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
android:ems=
"10"
android:hint=
"Password"
android:inputType=
"textPassword"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/edit_email_sign_up"
/>
<Button
android:id=
"@+id/signupBtn"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginLeft=
"16dp"
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
android:background=
"@color/colorPrimary"
android:text=
"Sign Up"
android:textColor=
"@color/common_google_signin_btn_text_dark_default"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/edit_password_sign_up"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
vip/build.gradle
View file @
dd9a2eb
...
...
@@ -8,7 +8,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.
0
'
classpath
'com.android.tools.build:gradle:3.5.
1
'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath
'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
...
...
Please
register
or
login
to post a comment