tıklayın Aşağıdaki EditText vardır:InflateException EditText
<EditText
android:id="@+id/et_username"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:background="#E6E6E6"
android:gravity="center_vertical"
android:hint="USERNAME"
android:paddingRight="5dp"
android:singleLine="true"
android:textAppearance="@null"
android:textColor="#9C9C9C"
android:textColorHint="#ADADAD"
android:textSize="20sp"/>
bunu metin yapıştırdığınızda, aşağıdaki hatayı alıyorum:
FATAL EXCEPTION: main
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)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.widget.Editor$ActionPopupWindow.initContentView(Editor.java:2928)
at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:2233)
at android.widget.Editor$ActionPopupWindow.<init>(Editor.java:2901)
at android.widget.Editor$ActionPopupWindow.<init>(Editor.java:2901)
at android.widget.Editor$HandleView.showActionPopupWindow(Editor.java:3302)
at android.widget.Editor$InsertionHandleView.showWithActionPopup(Editor.java:3536)
at android.widget.Editor$InsertionPointCursorController.showWithActionPopup(Editor.java:3780)
at android.widget.Editor.performLongClick(Editor.java:866)
at android.widget.TextView.performLongClick(TextView.java:8689)
at android.view.View$CheckForLongPress.run(View.java:19840)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=15; index=389
at android.content.res.StringBlock.get(StringBlock.java:65)
at android.content.res.XmlBlock$Parser.getPooledString(XmlBlock.java:458)
at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:991)
at android.content.res.TypedArray.getString(TypedArray.java:176)
at android.widget.TextView.<init>(TextView.java:1015)
at android.widget.TextView.<init>(TextView.java:632)
at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:60)
at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:56)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:963)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1022)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.widget.Editor$ActionPopupWindow.initContentView(Editor.java:2928)
at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:2233)
at android.widget.Editor$ActionPopupWindow.<init>(Editor.java:2901)
at android.widget.Editor$ActionPopupWindow.<init>(Editor.java:2901)
at android.widget.Editor$HandleView.showActionPopupWindow(Editor.java:3302)
at android.widget.Editor$InsertionHandleView.showWithActionPopup(Editor.java:3536)
at android.widget.Editor$InsertionPointCursorController.showWithActionPopup(Editor.java:3780)
at android.widget.Editor.performLongClick(Editor.java:866)
at android.widget.TextView.performLongClick(TextView.java:8689)
at android.view.View$CheckForLongPress.run(View.java:19840)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
EditText'in boş olup olmadığı olur.
Ayrıca, textColor özniteliği hiçbir şey yapmıyor, yalnızca textAppearance @null ile çalışır. Bu, tüm EditText ve TextView içinde olur, ancak Button ile olmaz.
Bu, Android Studio veya projemle ilgili mi?
Java kodunuzu paylaşabilir misiniz? – Suman
Bunu test ettiyseniz emin değilsiniz, ancak 'android: textAppearance = "@ null" 'öğesini kaldırırsanız ne olur. Şişirme uzun bir tıklama ile yapılmaz, bu yüzden kodunuzun bir parçası eksik gibi hissediyorum. Infact, şüphesiz bu metinAppearance. Bütün XML'inizi gösterir misiniz? – Knossos
whitout textAppearance @null aynı şey olmuyor –