code: @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          Intent intent = getIntent();
          if (intent != null) {
              Bundle extras = intent.getExtras();
              if (extras != null) {
                  images = extras.getStringArrayList(KEY_IMAGES);
                  title = extras.getString(KEY_TITLE);
              }
          }
  
          setContentView(R.layout.activity_image_gallery);
  
          bindViews();
  
          setSupportActionBar(toolbar);
          ActionBar actionBar = getSupportActionBar();
          if (actionBar != null) {
              actionBar.setDisplayHomeAsUpEnabled(true);
              actionBar.setTitle(title);
          }
  
          setUpRecyclerView();
      }
docs: region Lifecycle Methods