Here is my screenshot showing it. Since the startActivityForResult is old, so, what should I do to change the code in order that the code not showing error again?
public class MainActivity extends AppCompatActivity {
public static final int REQUEST_CODE_ADD_NOTE = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imageAddHeadspaceMain = findViewById(R.id.imageAddHeadspaceMain);
imageAddHeadspaceMain.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivityForResult(
new Intent(getApplicationContext(), CreateHeadspaceActivity.class),
REQUEST_CODE_ADD_NOTE
);
}
});
}
}