1
我在我的應用中使用BoomMenu。我想在單擊其中一個按鈕後啓動另一個活動,但出現錯誤(「無法解析構造函數」)。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)
我怎樣才能使這項工作?