安卓autocomplettextview未找到资源 - 资源不是绘制资源、未找到、不是、autocomplettextview

由网友(很酷不撩人)分享简介:这个问题让我疯了...... This issue is driving me crazy....产生的原因:android.content.res.Resources $ NotFoundException:资源不是绘制对象(彩色或路径)的TypedValue {T = 0X2 / D = 0x7f0100ab...

这个问题让我疯了......

This issue is driving me crazy....

产生的原因:android.content.res.Resources $ NotFoundException:资源不是绘制对象(彩色或路径)的TypedValue {T = 0X2 / D = 0x7f0100ab A = 3}             在android.content.res.Resources.loadDrawable(Resources.java:2816)             在android.content.res.TypedArray.getDrawable(TypedArray.java:602)             在android.view.View(View.java:3460)             在android.widget.TextView(TextView.java:791)             在android.widget.EditText(EditText.java:76)             位于的 android.widget.AutoCompleteTextView 的。(AutoCompleteTextView.java:137)             在android.widget.AutoCompleteTextView(AutoCompleteTextView.java:133)

Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f0100ab a=3} at android.content.res.Resources.loadDrawable(Resources.java:2816) at android.content.res.TypedArray.getDrawable(TypedArray.java:602) at android.view.View.(View.java:3460) at android.widget.TextView.(TextView.java:791) at android.widget.EditText.(EditText.java:76) at android.widget.AutoCompleteTextView.(AutoCompleteTextView.java:137) at android.widget.AutoCompleteTextView.(AutoCompleteTextView.java:133)

我的XML是:

 <AutoCompleteTextView
                android:layout_width="fill_parent"
                android:layout_height="38dp"
                android:id="@+id/idautoCompleteProfTextView"
                android:background="@drawable/edittext"    <---**drawable**...
                android:layout_marginLeft="30dp"
                android:layout_marginTop="0dp"
                android:layout_marginRight="30dp"
                android:layout_marginBottom="10dp"
                android:paddingLeft="15dp"
                android:paddingTop="5dp"
                android:paddingRight="15dp"
                android:paddingBottom="2dp"
                android:textAlignment="center"
                android:hint="@string/hint_signin_professional"
                android:layout_below="@+id/btnAcceptSigninProf"
                android:textColor="#000000"
                android:dropDownVerticalOffset="5dp"
                android:dropDownWidth="wrap_content"
                android:inputType="textAutoComplete|textAutoCorrect"
                android:popupBackground="@color/wallet_highlighted_text_holo_dark"/>

edittext.xml

edittext.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffff" />
    <corners android:radius="0dp"/>
    <stroke android:width="2dip"
            android:color="#ffffff" />
</shape>

林膨胀它作为一个片段。

Im inflating it as a fragment.

public class SigninProfessionalFragment extends Fragment {

    public SigninProfessionalFragment(){}

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View rootView = inflater.inflate(R.layout.fragment_signin_professional, container, false);
...

我没有C-后面就自动完成,因为我只是想加载它在我的设备,并检查布局$ C $,等等...

I have not code-behind regarding the autocomplete because I just want to load it in my device and check layout,etc...

推荐答案

这个问题应该在你的主题,但不是你贴code。

The problem should be in your theme, but not the code you posted.

阅读全文

相关推荐

最新文章