Appcompact EditText单击Cursor时出现Error(Appcompact EditText give Error on click of Cursor)

我在下面的TextInput布局中使用AppcompactEditText。

<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/name_et" style="@style/edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter your name" /> </android.support.design.widget.TextInputLayout>

现在我面临的问题是

当我在edittext中写文本然后双击编辑文本,这样当我点击它给它错误时它给移动光标。

我的logcat显示如下错误:

06-07 03:58:10.856 16475-16475/com.demo E/InputEventReceiver: Exception dispatching input event. 06-07 03:58:10.856 16475-16475/com.demo E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 06-07 03:58:10.857 16475-16475/com.demo E/MessageQueue-JNI: android.view.InflateException: Binary XML file line #17: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) at android.view.LayoutInflater.inflate(LayoutInflater.java:482)

我的Edittext风格:

<style name="edittext"> <item name="android:singleLine">true</item> <item name="android:focusableInTouchMode">true</item> <item name="android:typeface">serif</item> <item name="android:layout_gravity">center_horizontal</item> <item name="android:layout_marginTop">@dimen/margin_3dp</item> </style>

I am using AppcompactEditText Inside TextInput Layout like below.

<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/name_et" style="@style/edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter your name" /> </android.support.design.widget.TextInputLayout>

Now Which problem I am facing is

when i write text inside edittext then double click on Edit text so it give cursor for move when i click on it its give error.

My logcat is show error like below:

06-07 03:58:10.856 16475-16475/com.demo E/InputEventReceiver: Exception dispatching input event. 06-07 03:58:10.856 16475-16475/com.demo E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 06-07 03:58:10.857 16475-16475/com.demo E/MessageQueue-JNI: android.view.InflateException: Binary XML file line #17: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) at android.view.LayoutInflater.inflate(LayoutInflater.java:482)

My Edittext style:

<style name="edittext"> <item name="android:singleLine">true</item> <item name="android:focusableInTouchMode">true</item> <item name="android:typeface">serif</item> <item name="android:layout_gravity">center_horizontal</item> <item name="android:layout_marginTop">@dimen/margin_3dp</item> </style>

最满意答案

最后我解决了这个问题。 我弄错了什么。

我只是从Apptheme中删除Fontfamily和Typeface并将其解决。

Finally i have solved this problem . What i had make mistake.

I just Remove Fontfamily and Typeface from Apptheme and its solved.

Appcompact EditText单击Cursor时出现Error(Appcompact EditText give Error on click of Cursor)

我在下面的TextInput布局中使用AppcompactEditText。

<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/name_et" style="@style/edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter your name" /> </android.support.design.widget.TextInputLayout>

现在我面临的问题是

当我在edittext中写文本然后双击编辑文本,这样当我点击它给它错误时它给移动光标。

我的logcat显示如下错误:

06-07 03:58:10.856 16475-16475/com.demo E/InputEventReceiver: Exception dispatching input event. 06-07 03:58:10.856 16475-16475/com.demo E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 06-07 03:58:10.857 16475-16475/com.demo E/MessageQueue-JNI: android.view.InflateException: Binary XML file line #17: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) at android.view.LayoutInflater.inflate(LayoutInflater.java:482)

我的Edittext风格:

<style name="edittext"> <item name="android:singleLine">true</item> <item name="android:focusableInTouchMode">true</item> <item name="android:typeface">serif</item> <item name="android:layout_gravity">center_horizontal</item> <item name="android:layout_marginTop">@dimen/margin_3dp</item> </style>

I am using AppcompactEditText Inside TextInput Layout like below.

<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/name_et" style="@style/edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter your name" /> </android.support.design.widget.TextInputLayout>

Now Which problem I am facing is

when i write text inside edittext then double click on Edit text so it give cursor for move when i click on it its give error.

My logcat is show error like below:

06-07 03:58:10.856 16475-16475/com.demo E/InputEventReceiver: Exception dispatching input event. 06-07 03:58:10.856 16475-16475/com.demo E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 06-07 03:58:10.857 16475-16475/com.demo E/MessageQueue-JNI: android.view.InflateException: Binary XML file line #17: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) at android.view.LayoutInflater.inflate(LayoutInflater.java:482)

My Edittext style:

<style name="edittext"> <item name="android:singleLine">true</item> <item name="android:focusableInTouchMode">true</item> <item name="android:typeface">serif</item> <item name="android:layout_gravity">center_horizontal</item> <item name="android:layout_marginTop">@dimen/margin_3dp</item> </style>

最满意答案

最后我解决了这个问题。 我弄错了什么。

我只是从Apptheme中删除Fontfamily和Typeface并将其解决。

Finally i have solved this problem . What i had make mistake.

I just Remove Fontfamily and Typeface from Apptheme and its solved.