Commit 40e11f55 by Paktalin

Block new word field while editing

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