sendUserActionEvent() mView== null after clicking on button
Asked Answered
M

2

23

I have checked with this link but there its mentioned about long clicks. but I am facing this after clicking on button of custom dialog. I have pasted my code over here. can anyone help me to avoid this error.

  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>

M16 answered 23/11, 2013 at 9:31 Comment(5)
Hi, I am also facing the same issue, did you solved the issue ...Rector
@kumarsu: No not yet. but I got it on note 8 as well.M16
What is mView in your code. I do not see it in the attached sampleFellah
Possible duplicate of sendUserActionEvent() is nullAvan
Check my answer in this link, it may solve your problem: <br> #23016655Commutator
C
20

this is not a problem related to your code, but related to S4 android version. Same question has been posed on stackoverflow : sendUserActionEvent() is null

So, just ignore it ;)

Colombia answered 31/12, 2013 at 14:52 Comment(8)
Yes I have checked with that code as well and I am not only getting this ons4 but also getting this on note8.M16
I think this is due to the Samsung android layer which should be the same between S4 and note8.Colombia
Do you have any reference material for the sameM16
Just my Samsung Galaxy S4 : GT-I9505, Android version 4.3, Version I9505XXUEMKF, Kernel version 3.4.0-2082040Colombia
I have asked about Samsung android layer which u have mentioned in your comment.M16
Yeah, its name is TouchWiz, and the version is mentioned in my comment : Version 4.3-I9505XXUEMKFColombia
This also happens on Galaxy S3 with 4.3-JSS15J.I9300XXUGMK6 firmware.Wilden
the same on Samsung Galaxy Tab 4 7.0 -android 4.4.2Aircraftman
G
1

In my case I was using al this intent flags together to intent the activity:

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);

Just left the clear_top flag and it solved the problem:

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Gilmagilman answered 18/5, 2017 at 22:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.