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
51570a31
authored
Nov 20, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hopefully fixed the bug with latinit searchView
parent
103df8c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/MainActivity.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/views/LockableLayoutManager.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/MainActivity.kt
View file @
51570a31
...
@@ -24,7 +24,6 @@ class MainActivity : AppCompatActivity() {
...
@@ -24,7 +24,6 @@ class MainActivity : AppCompatActivity() {
lateinit
var
vocabularyFragment
:
VocabularyFragment
lateinit
var
vocabularyFragment
:
VocabularyFragment
lateinit
var
searchView
:
SearchView
lateinit
var
searchView
:
SearchView
lateinit
var
optionsMenu
:
Menu
var
inEditMode
=
false
var
inEditMode
=
false
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
...
@@ -35,13 +34,14 @@ class MainActivity : AppCompatActivity() {
...
@@ -35,13 +34,14 @@ class MainActivity : AppCompatActivity() {
swipeRefresh
.
setColorSchemeResources
(
R
.
color
.
colorAccent
)
swipeRefresh
.
setColorSchemeResources
(
R
.
color
.
colorAccent
)
hideKeyboard
()
hideKeyboard
()
setUpNavigationView
()
setUpNavigationView
()
extractVocabularyData
()
}
}
override
fun
onCreateOptionsMenu
(
menu
:
Menu
?):
Boolean
{
override
fun
onCreateOptionsMenu
(
menu
:
Menu
?):
Boolean
{
optionsMenu
=
menu
!!
menuInflater
.
inflate
(
R
.
menu
.
options_menu
,
menu
)
menuInflater
.
inflate
(
R
.
menu
.
options_menu
,
menu
)
searchView
=
menu
.
findItem
(
R
.
id
.
search
).
actionView
as
SearchView
searchView
=
menu
!!
.
findItem
(
R
.
id
.
search
).
actionView
as
SearchView
// extract vocabulary data only after searchView is initialized,
// since it needs to be called in the VocabularyFragment initialization
extractVocabularyData
()
return
true
return
true
}
}
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/views/LockableLayoutManager.kt
View file @
51570a31
...
@@ -12,6 +12,6 @@ class LockableLayoutManager(context: Context) : LinearLayoutManager(context) {
...
@@ -12,6 +12,6 @@ class LockableLayoutManager(context: Context) : LinearLayoutManager(context) {
}
}
companion
object
{
companion
object
{
private
val
TAG
=
"VN/"
+
VocabularyFragment
::
class
.
simpleName
private
val
TAG
=
"VN/"
+
LockableLayoutManager
::
class
.
simpleName
}
}
}
}
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