content: package com.example.sreemoyeec662.inboxapp;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.ArrayAdapter;
  import android.widget.Spinner;
  import android.widget.Toast;
  
  public class ComposeActivity extends AppCompatActivity {
  
      private Spinner mSpinner;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_compose);
          mSpinner = findViewById(R.id.gmail_id);
          ArrayAdapter<CharSequence> arrayAdapter = ArrayAdapter.createFromResource(this, R.array.gmail_list_id, android.R.layout.simple_spinner_item);
          arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          mSpinner.setAdapter(arrayAdapter);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.compose_menu, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          int id = item.getItemId();
          switch (id) {
              case R.id.action_attachment:
                  Toast.makeText(this, "Attachment menu is clicked", Toast.LENGTH_SHORT).show();
                  return true;
              case R.id.action_send:
                  Toast.makeText(this, "Send menu is clicked", Toast.LENGTH_SHORT).show();
                  return true;
              case R.id.action_settings:
                  Toast.makeText(this, "Settings menu is clicked", Toast.LENGTH_SHORT).show();
                  return true;
              case R.id.action_help_feedback:
                  Toast.makeText(this, "Help and feedback menu is clicked", Toast.LENGTH_SHORT).show();
                  return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  