2017-03-19 9 views
1

私のアプリでBoomMenuを使用しています。ボタンの1つをクリックして別のアクティビティを開始したいのですが、エラーが発生します(「コンストラクタを解決できません」)。BoomMenuリスナー - 開始アクティビティ(Android)

bmb.addBuilder(new SimpleCircleButton.Builder().normalImageRes(R.drawable.ic_add_white_48dp) 
      .listener(new OnBMClickListener() { 
       @Override 
       public void onBoomButtonClick(int index) { 
        Intent intent = new Intent(this, EditActivity.class); 
        startActivity(intent); 
       } 
      })); 

Error:(98, 41) error: no suitable constructor found for Intent(,Class)

constructor Intent.Intent(String,Uri) is not applicable (argument mismatch; cannot be converted to String)

constructor Intent.Intent(Context,Class) is not applicable (argument mismatch; cannot be converted to Context)

どのように私はこの作業を行うことができますか?

答えて

0

「this」を直接使用する代わりに、YourClassName.thisを試してください。

関連する問題