Android toolbar menu

  • Replies:0
Solo
  • Forum posts: 1

Jun 19, 2017, 9:12:29 PM via Website

Hi,

I am trying to understand the code for the Android Toolbar Menu.
What does this code do?

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                .setAction("Action", null).show();
    }
});

Reply