Commit 40e11f55 by Paktalin

Block new word field while editing

parent 287875d7
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
......
...@@ -7,6 +7,7 @@ import com.paktalin.vocabularynotebook.utils.gone ...@@ -7,6 +7,7 @@ import com.paktalin.vocabularynotebook.utils.gone
import com.paktalin.vocabularynotebook.utils.removeFragment import com.paktalin.vocabularynotebook.utils.removeFragment
import com.paktalin.vocabularynotebook.utils.showKeyboard import com.paktalin.vocabularynotebook.utils.showKeyboard
import com.paktalin.vocabularynotebook.utils.visible import com.paktalin.vocabularynotebook.utils.visible
import kotlinx.android.synthetic.main.word_item.*
class SubmitEditedFragment : SubmitFragment() { class SubmitEditedFragment : SubmitFragment() {
...@@ -15,8 +16,7 @@ class SubmitEditedFragment : SubmitFragment() { ...@@ -15,8 +16,7 @@ class SubmitEditedFragment : SubmitFragment() {
override fun init() { override fun init() {
mainActivity.vocabularyAdapter.showPopupMenu = false mainActivity.vocabularyAdapter.showPopupMenu = false
// TODO resolve this! visible(mainActivity.clickable_view)
// visible(mainActivity.clickable_view)
gone(clickableView) gone(clickableView)
wordEt.requestFocus() wordEt.requestFocus()
showKeyboard(mainActivity) showKeyboard(mainActivity)
...@@ -39,8 +39,7 @@ class SubmitEditedFragment : SubmitFragment() { ...@@ -39,8 +39,7 @@ class SubmitEditedFragment : SubmitFragment() {
wordEt.clearFocus() wordEt.clearFocus()
translationEt.clearFocus() translationEt.clearFocus()
visible(clickableView) visible(clickableView)
// TODO and this! gone(mainActivity.clickable_view)
// gone(mainActivity.clickable_view)
mainActivity.hideKeyboardNotFromActivity(mainActivity) mainActivity.hideKeyboardNotFromActivity(mainActivity)
mainActivity.vocabularyAdapter.showPopupMenu = true mainActivity.vocabularyAdapter.showPopupMenu = true
removeFragment(mainActivity.supportFragmentManager, this) removeFragment(mainActivity.supportFragmentManager, this)
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/word_item_layout" android:id="@+id/word_item_layout"
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:layout_alignBottom="@+id/layout"
android:src="@drawable/line" android:src="@drawable/line"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
...@@ -72,8 +73,10 @@ ...@@ -72,8 +73,10 @@
android:id="@+id/clickable_view" android:id="@+id/clickable_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignTop="@+id/layout"
android:layout_alignBottom="@+id/layout"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:visibility="gone" /> android:visibility="gone" />
</FrameLayout> </RelativeLayout>
\ No newline at end of file \ No newline at end of file
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