sendUserActionEvent() mView== null après avoir cliqué sur le bouton
J'ai vérifié avec cette lien mais là, mentionné au sujet de longue clics. mais je suis confronté à ce après avoir cliqué sur le bouton de la boîte de dialogue personnaliser.
J'ai collé mon code ici. quelqu'un peut-il m'aider à éviter cette erreur.
ibtnCancel.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.w("DemoDvicetracker", etConfirmPassword
.getText().toString());
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(
etConfirmPassword.getWindowToken(), 0);
passwordPopup.dismiss();
}
});
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rel"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:background="@drawable/popup_bg" >
<TextView
android:id="@+id/txt_enter_pwd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/enter_pwd"
android:textSize="24sp"
android:textColor="@android:color/black" />
<EditText
android:id="@+id/et_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txt_enter_pwd"
android:hint="@string/pwd"
android:background="@drawable/popup_textfeild"
android:layout_marginTop="30dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:inputType="textPassword"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="60dip"
android:layout_alignParentBottom="true"
android:layout_below="@+id/et_password"
android:gravity="bottom"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/ibtn_dialog_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/popup_cancel_selector"
android:contentDescription="@string/cancel"/>
<ImageButton
android:id="@+id/ibtn_dialog_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_weight="1"
android:background="@drawable/popup_submit_selector"
android:contentDescription="@string/submit"/>
</LinearLayout>
- Salut, je suis également confronté à la même question, avez-vous résolu le problème ...
- Non pas encore. mais je l'ai eu dans la note 8.
- Qu'est-ce que mView dans votre code. Je ne vois pas cela dans l'exemple joint
- Double Possible de sendUserActionEvent() est null
- Vérifier ma réponse dans ce lien, il peut résoudre votre problème: <br> stackoverflow.com/questions/23016155/...
Vous devez vous connecter pour publier un commentaire.
ce n'est pas un problème lié à votre code, mais liées à S4 version d'android.
Même question a été posée sur stackoverflow : sendUserActionEvent() est null
Donc, juste l'ignorer 😉
Dans mon cas, j'ai été en utilisant al cette intention drapeaux, ensemble, à l'intention de l'activité:
Juste à gauche de la clear_top drapeau et il a résolu le problème: