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
70e56d3c
authored
Sep 09, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keyboard is hidden in MainActivity
parent
52cb61c2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
25 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/LogInActivity.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/MainActivity.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/NewWordFragment.kt
app/src/main/AndroidManifest.xml
View file @
70e56d3c
...
...
@@ -25,9 +25,6 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".ui.AddWordActivity"
android:windowSoftInputMode=
"adjustResize"
/>
<activity
android:name=
".ui.WordItemInfoActivity"
/>
</application>
...
...
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
View file @
70e56d3c
...
...
@@ -77,8 +77,5 @@ class VocabularyAdapter(private val wordItems: MutableList<WordItem>, private va
val
layout
:
LinearLayout
=
itemView
.
findViewById
(
R
.
id
.
tableLayout
)
}
companion
object
{
private
val
TAG
=
"VN/"
+
VocabularyAdapter
::
class
.
java
.
simpleName
}
companion
object
{
private
val
TAG
=
"VN/"
+
VocabularyAdapter
::
class
.
java
.
simpleName
}
}
\ No newline at end of file
app/src/main/java/com/paktalin/vocabularynotebook/ui/LogInActivity.kt
View file @
70e56d3c
...
...
@@ -28,10 +28,7 @@ class LogInActivity : AppCompatActivity() {
override
fun
onStart
()
{
super
.
onStart
()
if
(
mAuth
!!
.
currentUser
!=
null
)
{
Log
.
d
(
TAG
,
"there is a logged in user"
)
startUserActivity
()
}
if
(
mAuth
!!
.
currentUser
!=
null
)
{
startUserActivity
()
}
}
private
fun
logIn
()
{
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/MainActivity.kt
View file @
70e56d3c
...
...
@@ -10,6 +10,7 @@ import com.google.firebase.firestore.FirebaseFirestore
import
com.paktalin.vocabularynotebook.R
import
kotlinx.android.synthetic.main.activity_main.*
import
android.view.WindowManager
class
MainActivity
:
AppCompatActivity
()
{
...
...
@@ -18,6 +19,7 @@ class MainActivity : AppCompatActivity() {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_main
)
hideKeyboard
()
setUpNavigationView
()
extractVocabularyData
()
}
...
...
@@ -54,6 +56,10 @@ class MainActivity : AppCompatActivity() {
}
}
private
fun
hideKeyboard
()
{
window
.
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_HIDDEN
)
}
companion
object
{
private
val
TAG
=
"VN/"
+
MainActivity
::
class
.
simpleName
}
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/NewWordFragment.kt
View file @
70e56d3c
...
...
@@ -62,24 +62,14 @@ class NewWordFragment : Fragment() {
}
private
fun
showAddWordButton
()
{
Log
.
d
(
TAG
,
"showAddWordButton"
)
activity
!!
.
findViewById
<
ImageButton
>(
R
.
id
.
btnAddWord
).
visibility
=
View
.
VISIBLE
}
activity
!!
.
findViewById
<
ImageButton
>(
R
.
id
.
btnAddWord
).
visibility
=
View
.
VISIBLE
}
private
fun
hideAddWordButton
()
{
Log
.
d
(
TAG
,
"hideAddWordButton"
)
activity
!!
.
findViewById
<
ImageButton
>(
R
.
id
.
btnAddWord
).
visibility
=
View
.
GONE
}
activity
!!
.
findViewById
<
ImageButton
>(
R
.
id
.
btnAddWord
).
visibility
=
View
.
GONE
}
private
fun
hideClearButton
()
{
Log
.
d
(
TAG
,
"hideClearButton"
)
btnClear
.
visibility
=
View
.
GONE
}
private
fun
hideClearButton
()
{
btnClear
.
visibility
=
View
.
GONE
}
private
fun
showClearButton
()
{
Log
.
d
(
TAG
,
"showClearButton"
)
btnClear
.
visibility
=
View
.
VISIBLE
}
private
fun
showClearButton
()
{
btnClear
.
visibility
=
View
.
VISIBLE
}
private
fun
addWord
()
{
//todo get word data from edit texts and save it
...
...
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