How to add multiple implementations after extending the AppCompatActivity?
Why am I getting this error? Please correct this piece of code.
public class MainActivity extends AppCompatActivity
implements PopupMenu.OnMenuItemClickListener
implements NavigationView.OnNavigationItemSelectedListener{
Change it to
public class MainActivity extends AppCompatActivity
implements PopupMenu.OnMenuItemClickListener, NavigationView.OnNavigationItemSelectedListener{
You should read this too.
You shouldn't use implements
twice to do so, just use it like this:
public class MainActivity extends AppCompatActivity
implements firstImplement, secondImplement {}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.