I'm new to Android and going to crazy for this issue this whole day... 

I have a custom preferenceFragment 

```html
       @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View view = super.onCreateView(inflater, container, savedInstanceState);

            View v = inflater.inflate(R.layout.parent_login, null);

            Button b = (Button)v.findViewById(R.id.parentLoginButton);

            if (b != null) {

                Log.i("Settings", "I find the button");

                b.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View view) {

                        Log.i("Settings", "he he");

                    }
                });
            } else {
                Log.i("Settings", "I can't find the button");
            }

            return view;
        }
```

The actually run result is the button 'b' is not null, can be found, but the setOnClickListener seems not working, and when I click on the button, show following log: 

```
11-25 18:28:16.484 562-601/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.376 ] when=19678293069000
11-25 18:28:16.484 562-600/? I/InputDispatcher: Delivering touch to: action: 0x4, toolType: 1
11-25 18:28:16.484 562-600/? I/InputDispatcher: Delivering touch to: action: 0x0, toolType: 1

```

...

Please help me..

The xml file under src: 

```html
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

    <Preference
        android:title="@string/pref_header_account"
        android:key="pref_parent_login"
        android:layout="@layout/parent_login" />

</PreferenceScreen>
```

```html
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:orientation="vertical">

    <EditText
        android:id="@+id/parentLoginEmail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/parent_account_email"
        android:textSize="16dp" />

    <EditText
        android:id="@+id/parentLoginPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/parent_account_password"
        android:textSize="16dp"
        android:inputType="textPassword" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Log In"
        android:id="@+id/parentLoginButton"
        android:layout_alignParentBottom="true"
        android:layout_toLeftOf="@+id/textview"
        android:layout_toStartOf="@+id/textview" />

</LinearLayout>
```