2012-04-26 14 views
1

AutoCompleteTextViewのフィルタオプションを調整したいのは、間に空白がないためです。私は、フラグメントを使用するので、私はレイアウトファイルを膨らませるよカスタムウィジェット:クラスの膨張エラー

<my.house.MyAutoCompleteView 
    android:id='@+id/search' 
    android:layout_height='wrap_content' 
    android:layout_width='fill_parent' 
    android:singleLine='true' 
    ></my.house.MyAutoCompleteView> 

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); 
    } 
} 

はこの事をテストするために、私は私のレイアウトXMLを変更:それは、私は、クラスと呼ばれるMyAutoCompleteViewを作成した理由です。

ここに私のフラグメントでonCreateViewメソッドです:

android.view.InflateException:バイナリXMLファイルのライン#17:エラー膨張クラス

@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); 
} 

残念ながら私は、このエラーメッセージが出ていmy.house.MyAutoCompleteView

どのような問題が発生する可能性がありますか?ありがとう!

+0

「xmlns:android = 'http:// schemas.android.com/apk/res/android'' from my.house.MyAutoCompleteView –

+0

コメントありがとうございました!私はラインを削除しました - 変更はありません。まだ: "クラスを膨張させるエラー" – Marco

答えて

2

proguardは残念ながら私のコードを最適化し、コンストラクタでそれを減らしました。 Proguardが無効になって動作します。

関連する問題