tags:

views:

859

answers:

1

Hello,friends: I want to implement my own Tokenizer base on the file "MultiAutoCompleteTextView.java",

but I encounter an error "com.android.internal.R cannot be resolved" when I try to

import "MultiAutoCompleteTextView.java" to my project.

code:

public class MultiAutoCompleteTextView extends AutoCompleteTextView {
    private Tokenizer mTokenizer;

    public MultiAutoCompleteTextView(Context context) {
        this(context, null);
    }

    public MultiAutoCompleteTextView(Context context, AttributeSet attrs) {
        this(context, attrs, com.android.internal.R.attr.autoCompleteTextViewStyle);
    }

    public MultiAutoCompleteTextView(Context context, AttributeSet attrs, int defStyle)     {
        super(context, attrs, defStyle);
    }
    .
    .
    .
}

I haven't research any solutions to resolve this problem.How to correct "com.android.internal.R.attr.autoCompleteTextViewStyle" my own attr?

Thank you for any suggestions.

A: 

I am not sure if you can import and reference from internal. As a workaround download the references from the android source, and include in your own resources, and reference from your package.

Pentium10
Thank you foryour answer.I want to change some methods in this java profile to my methods,and import it into my project.But I can'nt correct the error in this sentence"this(context, attrs, com.android.internal.R.attr.autoCompleteTextViewStyle)"
huaigu
Have you tried rewriting to `com.android.R.attr.autoCompleteTextViewStyle` by taking down the internal package?
Pentium10
I don't how to rewrite this file and I cann't find this file...
huaigu
I meant to change it to `this(context, attrs, com.android.R.attr.autoCompleteTextViewStyle);` watch this closely as it differs from what you have in your code.
Pentium10