0
I have three edittext, I want that when I click out of them or finish filling my keyboard sum. Being that they are a Fragment. How to do this?
My XML with editText.
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:background="@drawable/shadow_grey"
android:id="@+id/cadastroAvaliador"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<AutoCompleteTextView
android:id="@+id/colaboradoresAmc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Avaliador">
</AutoCompleteTextView>
<AutoCompleteTextView
android:id="@+id/contratadasAmc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Contratada"
android:layout_below="@+id/colaboradoresAmc"
android:layout_alignStart="@+id/colaboradoresAmc">
</AutoCompleteTextView>
<EditText
android:id="@+id/dataRealizada"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contratadasAmc"
android:layout_alignStart="@+id/contratadasAmc"
android:ems="6"
android:inputType="date"
android:hint="Data Realizada"
android:clickable="true"
android:focusableInTouchMode="true" />
<Spinner
android:id="@+id/spinnerTipo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/dataRealizada"
android:layout_alignTop="@+id/dataRealizada"
android:layout_alignBottom="@+id/dataRealizada"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/contentTipo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cadastroAvaliador"
android:layout_alignEnd="@+id/cadastroAvaliador"
android:layout_alignStart="@+id/cadastroAvaliador">
</RelativeLayout>
</RelativeLayout>
When I click on the marked/scribbled area I wanted the keyboard to hide.
Thanks in advance.
https://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard
– viana
@acklay is not what I want. I want that after using the keyboard it leaves the screen.
– Lucas Charles
And how do you get out of Edittext? Press a button?! You can edit the question and explain it better, or even exemplify it, or even put some code you think is relevant to your question?!
– viana
I updated the question @acklay
– Lucas Charles
What is this area? In the xml you posted, what is the part that declares this area?
– ramaral
It’s the <Relativelayout android:id="@+id/contentTipo". @ramaral
– Lucas Charles
This Relativelayout has something inside?
– ramaral
It has a listview, I already put the ID for it. But it generates an error. This contentType is where the listview comes in. java.lang.Nullpointerexception: Attempt to invoke interface method 'Boolean android.app.Iactivitymanager.handleApplicationWtf(android.os.Ibinder,
– Lucas Charles
So it becomes complicated to give an answer. First you say it’s outside, then it’s in a certain area, now the area has a Listview. Where we are?
– ramaral