Android setVisibility to GONE in a View part of a DialogFragment which implements OnItemClickListener -


I have a class that encompasses DialogFragment and OnItemClickListener.

In this dialog fragrance I have a view called rootview, where I grow my main view when I press a button, I create two views:

  SelectItemForm = rootView.findViewById (R.id.logging_selectitem_form); PartForm = rootView.findViewById (R.id.logging_selectitem_portion); // Choose switch formsTypeformSetVisibility (see .invisible); PortionForm.setVisibility (View.VISIBLE);  

In this way, the following sequence sequence is the original view> select the formform> part farm.

However, when I press the back button in part I instead selectIfemform to return to rootew.

I have also created a major listener:

  Partform.SetOnCalister (new view. Onkelist () {@ Override Public Boolean Onki (see V, Int kikod, KeyEvent Event} {Log V. (TAG + "_setPortionFormOnKeyListener", "I have clicked on the back button."); See if (keycode == KeyEvent.KEYCODE_BACK) {// switch forms (see ShareForm.getVisibility () == VISIBLE) {partForm.setVisibility (see INVISIBLE); selectItemForm.setVisibility (see Visual Studio); return true;}} return false;}});  

However, this keyloster is never called, so it is not working either

thanks in advance for all help

  @Override public boolean overview (int keycode, keyEvent event) {if (keycode == KeyEvent.KEYCODE_BACK) {if ( See ShareForm.getVisibility () ==.Visual) {portionForm.setVisibility (see. INVISIBLE); SelectItemForm.setVisibility (View.VISIBLE); }} Return super. Nkup (keycod, incident); }  

Comments