Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
vocabulary_notebook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e8a42e4a
authored
Nov 19, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring: email is substituted with username
parent
7bd71fc9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
app/src/main/res/layout/activity_log_in.xml
app/src/main/res/values/strings.xml
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
View file @
e8a42e4a
...
@@ -49,7 +49,7 @@ class LogInActivity : AppCompatActivity() {
...
@@ -49,7 +49,7 @@ class LogInActivity : AppCompatActivity() {
com
.
paktalin
.
vocabularynotebook
.
utils
.
addProgressBar
(
supportFragmentManager
,
R
.
id
.
container_login
)
com
.
paktalin
.
vocabularynotebook
.
utils
.
addProgressBar
(
supportFragmentManager
,
R
.
id
.
container_login
)
}
}
private
fun
getUsernameAndPassword
()
=
Pair
(
et
Email
!!
.
text
.
toString
(),
etPassword
!!
.
text
.
toString
())
private
fun
getUsernameAndPassword
()
=
Pair
(
et
Username
!!
.
text
.
toString
(),
etPassword
!!
.
text
.
toString
())
companion
object
{
private
val
TAG
=
"VN/"
+
LogInActivity
::
class
.
simpleName
}
companion
object
{
private
val
TAG
=
"VN/"
+
LogInActivity
::
class
.
simpleName
}
}
}
\ No newline at end of file
app/src/main/res/layout/activity_log_in.xml
View file @
e8a42e4a
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
android:background=
"@drawable/wood"
>
android:background=
"@drawable/wood"
>
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
android:id=
"@+id/
email
PasswordLayout"
android:id=
"@+id/
username
PasswordLayout"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/sheet"
android:background=
"@drawable/sheet"
...
@@ -23,16 +23,15 @@
...
@@ -23,16 +23,15 @@
android:layout_marginTop=
"?android:attr/actionBarSize"
>
android:layout_marginTop=
"?android:attr/actionBarSize"
>
<EditText
<EditText
android:id=
"@+id/et
Email
"
android:id=
"@+id/et
Username
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/small_margin"
android:layout_margin=
"@dimen/small_margin"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
android:ems=
"10"
android:ems=
"10"
android:textSize=
"@dimen/text_size"
android:textSize=
"@dimen/text_size"
android:fontFamily=
"@font/neucha"
app:fontFamily=
"@font/neucha"
android:hint=
"@string/hint_email"
android:hint=
"@string/hint_username"
android:inputType=
"textEmailAddress"
android:paddingEnd=
"@dimen/small_padding"
android:paddingEnd=
"@dimen/small_padding"
android:paddingLeft=
"@dimen/small_padding"
android:paddingLeft=
"@dimen/small_padding"
android:paddingRight=
"@dimen/small_padding"
android:paddingRight=
"@dimen/small_padding"
...
@@ -45,13 +44,13 @@
...
@@ -45,13 +44,13 @@
app:layout_constraintVertical_chainStyle=
"packed"
/>
app:layout_constraintVertical_chainStyle=
"packed"
/>
<ImageView
<ImageView
android:id=
"@+id/line
Email
"
android:id=
"@+id/line
Username
"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/line"
android:src=
"@drawable/line"
app:layout_constraintLeft_toLeftOf=
"@+id/et
Email
"
app:layout_constraintLeft_toLeftOf=
"@+id/et
Username
"
app:layout_constraintRight_toRightOf=
"@+id/et
Email
"
app:layout_constraintRight_toRightOf=
"@+id/et
Username
"
app:layout_constraintTop_toBottomOf=
"@+id/et
Email
"
app:layout_constraintTop_toBottomOf=
"@+id/et
Username
"
tools:ignore=
"ContentDescription"
/>
tools:ignore=
"ContentDescription"
/>
<EditText
<EditText
...
@@ -63,7 +62,7 @@
...
@@ -63,7 +62,7 @@
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
android:textSize=
"@dimen/text_size"
android:textSize=
"@dimen/text_size"
android:ems=
"10"
android:ems=
"10"
a
ndroid
:fontFamily=
"@font/neucha"
a
pp
:fontFamily=
"@font/neucha"
android:hint=
"@string/hint_password"
android:hint=
"@string/hint_password"
android:inputType=
"textPassword"
android:inputType=
"textPassword"
android:paddingEnd=
"@dimen/small_padding"
android:paddingEnd=
"@dimen/small_padding"
...
@@ -73,7 +72,7 @@
...
@@ -73,7 +72,7 @@
android:textColor=
"@color/text_color"
android:textColor=
"@color/text_color"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/line
Email
"
/>
app:layout_constraintTop_toBottomOf=
"@+id/line
Username
"
/>
<ImageView
<ImageView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -95,14 +94,14 @@
...
@@ -95,14 +94,14 @@
android:layout_margin=
"@dimen/small_margin"
android:layout_margin=
"@dimen/small_margin"
android:text=
"@string/log_in"
android:text=
"@string/log_in"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
a
ndroid
:fontFamily=
"@font/neucha"
a
pp
:fontFamily=
"@font/neucha"
android:textSize=
"@dimen/button_text_size"
android:textSize=
"@dimen/button_text_size"
android:textColor=
"@color/sheet_color"
android:textColor=
"@color/sheet_color"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/btnSignUp"
app:layout_constraintEnd_toStartOf=
"@id/btnSignUp"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/
email
PasswordLayout"
/>
app:layout_constraintTop_toBottomOf=
"@+id/
username
PasswordLayout"
/>
<Button
<Button
android:id=
"@+id/btnSignUp"
android:id=
"@+id/btnSignUp"
...
@@ -114,7 +113,7 @@
...
@@ -114,7 +113,7 @@
android:layout_marginStart=
"8dp"
android:layout_marginStart=
"8dp"
android:text=
"@string/sign_up"
android:text=
"@string/sign_up"
android:background=
"@android:color/transparent"
android:background=
"@android:color/transparent"
a
ndroid
:fontFamily=
"@font/neucha"
a
pp
:fontFamily=
"@font/neucha"
android:textSize=
"@dimen/button_text_size"
android:textSize=
"@dimen/button_text_size"
android:textColor=
"@color/colorPrimary"
android:textColor=
"@color/colorPrimary"
app:layout_constraintBottom_toBottomOf=
"@+id/btnLogIn"
app:layout_constraintBottom_toBottomOf=
"@+id/btnLogIn"
...
...
app/src/main/res/values/strings.xml
View file @
e8a42e4a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<string
name=
"btn_save"
>
Save
</string>
<string
name=
"btn_save"
>
Save
</string>
<string
name=
"btn_cancel"
>
Cancel
</string>
<string
name=
"btn_cancel"
>
Cancel
</string>
<string
name=
"hint_password"
>
Password
</string>
<string
name=
"hint_password"
>
Password
</string>
<string
name=
"hint_
email"
>
Email
</string>
<string
name=
"hint_
username"
>
Email or username
</string>
<string
name=
"hint_word"
>
word
</string>
<string
name=
"hint_word"
>
word
</string>
<string
name=
"hint_translation"
>
translation
</string>
<string
name=
"hint_translation"
>
translation
</string>
<string
name=
"menu_option_delete"
>
Delete
</string>
<string
name=
"menu_option_delete"
>
Delete
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment