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
1ebb1ee6
authored
Nov 12, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't lock scrolling in edit mode
parent
17f05b7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/paktalin/vocabularynotebook/ui/fragments/EditWordFragment.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/views/LockableLayoutManager.kt
app/src/main/AndroidManifest.xml
View file @
1ebb1ee6
...
...
@@ -17,7 +17,7 @@
<activity
android:label=
"@string/app_name"
android:name=
".ui.activities.MainActivity"
android:windowSoftInputMode=
"adjustResize"
>
android:windowSoftInputMode=
"adjustResize
|stateHidden
"
>
<intent-filter>
<action
android:name=
"android.intent.action.SEARCH"
/>
</intent-filter>
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/fragments/EditWordFragment.kt
View file @
1ebb1ee6
...
...
@@ -32,7 +32,7 @@ class EditWordFragment : WordFragment() {
this
.
container
=
container
hidePreviousViews
()
wordItem
=
arguments
!!
[
"wordItem"
]
as
WordItem
(
mainActivity
.
recyclerView
.
layoutManager
as
LockableLayoutManager
).
isScrollEnabled
=
false
//
(mainActivity.recyclerView.layoutManager as LockableLayoutManager).isScrollEnabled = false
return
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
)
}
...
...
@@ -98,7 +98,6 @@ class EditWordFragment : WordFragment() {
removeFragment
(
mainActivity
.
supportFragmentManager
,
this
)
mainActivity
.
hideKeyboardNotFromActivity
(
mainActivity
)
gone
(
mainActivity
.
btnSubmitLayout
)
(
mainActivity
.
recyclerView
.
layoutManager
as
LockableLayoutManager
).
isScrollEnabled
=
true
mainActivity
.
inEditMode
=
false
}
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/views/LockableLayoutManager.kt
View file @
1ebb1ee6
...
...
@@ -5,7 +5,7 @@ import android.support.v7.widget.LinearLayoutManager
import
com.paktalin.vocabularynotebook.ui.fragments.VocabularyFragment
class
LockableLayoutManager
(
context
:
Context
)
:
LinearLayoutManager
(
context
)
{
internal
var
isScrollEnabled
=
true
private
var
isScrollEnabled
=
true
override
fun
canScrollVertically
():
Boolean
{
return
isScrollEnabled
&&
super
.
canScrollVertically
()
...
...
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