Custom Widget: Error inflating class

kamelboustani

New Member
I want to adjust the Filter options of the AutoCompleteTextView, since it does not recognise spaces in between. That's why I created a class called MyAutoCompleteView:\[code\]package my.house;public class MyAutoCompleteView extends android.widget.AutoCompleteTextView{ public MyAutoCompleteView (android.content.Context context) { super (context); } public MyAutoCompleteView(android.content.Context context, android.util.AttributeSet attrs) { super(context, attrs); } public MyAutoCompleteView(android.content.Context context, android.util.AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); }}\[/code\]To test this thing, I changed my layout xml to: \[code\]<my.house.MyAutoCompleteView android:id='@+id/search' android:layout_height='wrap_content' android:layout_width='fill_parent' android:singleLine='true' ></my.house.MyAutoCompleteView>\[/code\]I'm inflating the layout file since I use Fragments. Here's the onCreateView Method in my Fragment: \[code\]@Override public android.view.View onCreateView ( final android.view.LayoutInflater inflater, final android.view.ViewGroup container, final android.os.Bundle savedInstanceState) { return inflater.inflate (my.house.R.layout.myfragment, container, false);}\[/code\]Unfortunatly I'm getting this error message: \[quote\] android.view.InflateException: Binary XML file line #17: Error inflating class my.house.MyAutoCompleteView\[/quote\]Any ideas what the problem might be? Thanks!
 
Back
Top