Commit 1ebb1ee6 by Paktalin

Don't lock scrolling in edit mode

parent 17f05b7a
......@@ -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>
......
......@@ -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
}
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment