Solution 1 :
Replace your this
with your ActivityName.this for example
EditUser_.intent(LoginActivity.this).start();
More reference here. I hope you do your research next time.
Problem :
I’m trying to update an object in Realm. The error is at the last line of code from the adapter. I have seen a source code similar to what I have below but it uses dialogPlus and its last line is just dialogPlus.show()
What should mine contain if I won’t be using dialogPlus and just want to display my edit screen on an activity (EditUser) with its fields prepopulated?
The error is on “this”: Cannot resolve method ‘intent(anonymous android.view.View.OnClickListener)’
holder.btnEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EditText un = view.findViewById(R.id.eUsername);
un.setText(u.getUsername());
EditUser_.intent(this).start();
}
});